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

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us

Problems with returning true or false in eval()'d code
Hi guys,

Would appreciate some help with a problem when running eval() on a function that sho

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