Re: Printing sub objects/2 dimensional arrays

From: Date: Fri, 24 Nov 2000 18:44:39 +0000
Subject: Re: Printing sub objects/2 dimensional arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26982@lists.php.net to get a copy of this message
Hi! yepp! print "{$content->creator->vorname} {$content->creator->nachname}<BR>\n"; is working Tnx Folke On Fri, 24 Nov 2000, Ignacio Vazquez-Abrams wrote: > On Fri, 24 Nov 2000, Folke Ashberg wrote: > > > Hi! > > Printing a lot sub objects is very exhausting because you have to append > > all objects doing > > print $foo->bar->foobar." is foo<BR>\n and > > ".$foo->bar->xyz." > > also<BR>\n"; > > > > Isn't there a possibility to use only > > > > print "$foo->bar->foobar is foo<BR>\n and $foo->bar->xyz > > also<BR>\n"; > > > > PHP will output > > Object->foobar is foo > > and Object->xyz also > > > > The same problem using 2dimensional arrays > > print "$foo[bar][xyz] and the string goes on.."; > > > > regards > > > > Folke > > > > Try puting the variable in braces (i.e., "{" and "}"). > >

« previous php.general (#26982) next »