The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Aug 19, 2008 2:12 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jan 14, 2008 10:48 am
Posts: 120
Location: London, UK
Hi,

a bit of a n00bie question here: I'm trying to print out an element of an array and I'm having trouble accessing it.

I'm querying a table using JFACTORY::getDBO() and a print_r of the result returns this:

Code:
Array ( [0] => stdClass Object ( [title] => Infrastructure ) )


And what I'd like to do is print out 'Infrastructure'. What can I use to access it?

Thanks in advance for your help,
C.

_________________
Chandesh Parekh
Joomla & WordPress Web Development
twitter : http://www.twitter.com/chandeshparekh
web : http://chandeshparekh.com


Top
 Profile  
 
PostPosted: Tue Aug 19, 2008 6:53 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Nov 10, 2005 3:10 am
Posts: 1926
Location: New Jersey, USA
echo $var[0]->title;

_________________
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs


Top
 Profile  
 
PostPosted: Wed Aug 20, 2008 7:44 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jan 14, 2008 10:48 am
Posts: 120
Location: London, UK
ircmaxell,

Thanx, that did it! :)

_________________
Chandesh Parekh
Joomla & WordPress Web Development
twitter : http://www.twitter.com/chandeshparekh
web : http://chandeshparekh.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 



Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group