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

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

Add trigger to UpdatePanel programmatically
Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel whi

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