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

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

is_dir() problem
Hello,

I'm buidling a php scripts that dynamically get's subfolders from a specific folder.

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

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