Re: [PHP] question about <<<EOF
- From: tedd.sperling@xxxxxxxxx (tedd)
- Date: Tue, 30 Sep 2008 10:35:30 -0400
At 12:48 PM +0800 9/30/08, LKSunny wrote:
Hello,
i want on inner EOF do something, calculate and call function ? can not ? if
yes, how to ?
<?
echo <<<EOF
some text....
can i calculate on inner EOF ? 10*100 display 1000 ?
can i add function on inner EOF ? date('Y') display 2008 ?
any more text.
EOF;
//i want output is
/*
some text....
can i calculate on inner EOF ? 1000 display 1000 ?
can i add function on inner EOF ? 2008 display 2008 ?
any more text.
*/
?>
Like I tell my dogs "Don't do it inside".
Place your decision making outside of the herdoc and then branch to whatever heredoc you want.
My advice,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.
- References:
- question about <<<EOF
- From: "LKSunny"
- question about <<<EOF
- Prev by Date: Re: [PHP] Wanted PHP Developers LogicManse
- Next by Date: Re: [PHP] for the sake of conversation - syntax
- Previous by thread: Re: question about <<<EOF
- Next by thread: Server issue
- Index(es):