Accessing element of object array


Posted on 16th Feb 2014 07:03 pm by admin

Hello

My object looks like this:

Did you know?Explore Trending and Topic pages for more stories like this.

Array ( [0] => User Object ( [id] => [username] => [password] => [title] => [firstname] => [surname] => [email] => [active] => [salt] => M}8 ) )


This is the result of a SQL method from my SQL class.


$result_array = self::find_by_sql($sql);


Can you please tell me how I can access the 'salt' element of the object array above ? I've been trying:

$result_array->salt

but that doesn't work.

Thanks for any assistance
No comments posted yet

Your Answer:

Login to answer
165 Like 39 Dislike
Previous forums Next forums
Other forums

How to change www in url with a specified name
Hi
I'm trying to change the url http://www.sitename.com/apparels to something like below
http:

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

Code Review - SQL and Insertion Attacks (Warning: Not for Newbs)
Hey guys,

Its been a while, I know. Use to love coming here to answer peoples questions, but

Please help with code for SMTP authenticated PHP email form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash