Re: question about <<<EOF

From: Date: Tue, 30 Sep 2008 07:38:37 +0000
Subject: Re: question about <<<EOF
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-281150@lists.php.net to get a copy of this message
On Tue, 30 Sep 2008 12:48:35 +0800, LKSunny wrote: >i want on inner EOF do something, calculate and call function ? can not ? if >yes, how to ? Same way as you do with "" strings. e.g. <?php class foo { function bar() { return 'world!'; } function hello() { echo <<<ENDHELLO Hello, {$this->bar()} ENDHELLO; } } $foo = new foo(); $foo->hello(); ?> -- Ross McKay, Toronto, NSW Australia "Let the laddie play wi the knife - he'll learn" - The Wee Book of Calvin

« previous php.general (#281150) next »