动态的改变变量名称:
$varname='bookPrice'; $$varname=5; //等价于 $bookPrice=5;
问了问别人说用于字符串拼接,先记下来:
$book='C++'; $$book="10 yuan"; echo $book." ".${$book};
动态的改变变量名称:
$varname='bookPrice'; $$varname=5; //等价于 $bookPrice=5;
问了问别人说用于字符串拼接,先记下来:
$book='C++'; $$book="10 yuan"; echo $book." ".${$book};