Re: question about <<<EOF
- From: rosko@xxxxxxxxxxx (Ross McKay)
- Date: Tue, 30 Sep 2008 17:38:37 +1000
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
.
- References:
- question about <<<EOF
- From: "LKSunny"
- question about <<<EOF
- Prev by Date: Server issue
- Next by Date: Name of graph
- Previous by thread: Re: [PHP] question about <<<EOF
- Next by thread: Re: [PHP] question about <<<EOF
- Index(es):
Relevant Pages
|