Re: question about <<<EOF

From: Date: Tue, 30 Sep 2008 14:35:30 +0000
Subject: Re: question about <<<EOF
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-281172@lists.php.net to get a copy of this message
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

« previous php.general (#281172) next »