Accessing element of object array


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

Hello

My object looks 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

Saving data from a form into a file
Hey everybody,

Sorry, I am really new to PHP coding and such but a project kind of got thrust

Not loading image
When this function gets loaded it doesn't load the image just trying to figure out why.

Code:

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

Warehouse Management
Hi,

On our system, we have two storage locations ( A and B ) where A is the main factory

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

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