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

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

unoconv doc convert to pdf code prob
PHP/5.3.1

Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. Howe

Stopping page post back
I have few literal contriols in my page and a repeater too. But inspite of using update panel, postb

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

SQL Query/echo not working
Hey all,

I'm trying to run (what I thought) was a simple operation and it isn't working. I h

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

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

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