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

Help Optimizing code
Good Morning,

I wrote a small import function for a website of mine and I know there has to b

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

Linux socket programming
Where can I find a good introduction to socket programming?

How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Pulling out some result data from MYSQL
Hey Guys,

I've built a PHP page that has a for just imagine something like registration form

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