Re: I can't echo object variables

From: Date: Tue, 16 Jul 2002 21:22:50 +0000
Subject: Re: I can't echo object variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107972@lists.php.net to get a copy of this message
Привет! Michael Zornek wrote:
We all know this works: echo "<p>$someVar"; However this does not: echo "<p>$db->field('name_long')"; I know this slight variation will make it work: echo "<p>" . $db->field('name_long'); But it's cumbersome .. Anyway to get the first way to work? ~ Mike
In your example you try and execute a "method" within a quoted string. That would not work even with a traditional function call, AFAIK. Пока Альберто Киев @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

« previous php.general (#107972) next »