Thread: PHP Object
View Single Post
Old 10-29-2007, 04:54 AM   #1 (permalink)
Sketch
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 664
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
PHP Object

Hello,

I've got a problem with a script I'm trying to modify.

I don't know much about objects, I always tend to use arrays.

If I do the following

PHP Code:
print_r($_SESSION['emf1_controller']); 
I am left with;

Code:
__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => controller [myErrorPage] => phpErrorCheck.php [dbh] => 0 [user] => stdClass Object ( [user_userId] => 1000 [user_firstname] => Mick [user_surname] => Sketch ) )
I want to try and access the user_firstname field.

I've tried a few different things like

PHP Code:
echo $_SESSION['emf1_controller']['user']->user_firstname 
and a lot of other things and none seem to work. Can anyone help me access this field?
Sketch is offline   Reply With Quote