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

Pro-rata Billing in Periodic Billing for Rental
Hi guys,

We have a situation, where a rental contract starts at the mid of the month say

Loop column after 2 results
Hello All.

Here is what I have:

Client ID Company name Clien

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

Cant display mysql data
Hey all,

I am learning php and my first goal is to create a simple CMS. At the moment I am st

Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

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