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

IS Retail & Manufacturing
Hi

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

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the for

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Undefined variables
hi
----------------------------------------------------------------------------------------------

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