Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 10-29-2007, 04:54 AM   #1 (permalink)
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  
Add Post to del.icio.us
Reply With Quote
Old 10-29-2007, 09:28 AM   #2 (permalink)
v7n Mentor
 
Join Date: 07-24-06
Posts: 691
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nice
I guess:

echo $_SESSION['emf1_controller'] -> user -> user_firstname;
nasty.web is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
associative array vs object I like pie Coding Forum 6 01-31-2007 07:56 PM
If money was not an object... Heather Forum Lobby 70 04-13-2006 12:18 PM
Object Dock Icons Leon Graphic Design Forum 19 07-27-2004 08:20 PM
<object> </object> area clickable softstor Coding Forum 3 06-14-2004 12:35 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:35 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.