尝试输出以下5个代码,但不确定如何操作。有什么想法吗?
<?php
$other='What are you like?';
$content['my_name']=4;
$str=<<<JT
here is some info. $other Do
you like the number {$content['my_name']+1} ?
JT;
echo $str . '<br />';发布于 2010-06-08 07:51:23
正如Pekka所说的那样:
$str=<<<JT
here is some info. $other Do
you like the number {$content['my_name']+1} ?
JT;是无效的-在heredoc文档中只解析变量。
$content['my_name'] += 1;
$str=<<<JT
here is some info. $other Do
you like the number {$content['my_name']} ?
JT;https://stackoverflow.com/questions/2993936
复制相似问题