<?php $string = 'cup'; $name = 'coffee'; $str = 'This is a $string with my $name in it.<br>'; echo $str; eval ("\$str = \"$str\";"); echo $str; ?> The above example will show: This is a $string with my $name in it. This is a cup with my coffee in it.
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.<br>';
echo $str;
eval ("\$str = \"$str\";");
echo $str;
?>
The above example will show: This is a $string with my $name in it.
This is a cup with my coffee in it.
谢谢,那后面的几个函数呢?