<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "\n";
eval("\$str = \"$str\";");
echo $str. "\n";
?>
以上例程會輸出:
This is a $string with my $name in it.
This is a cup with my coffee in it.
全站熱搜
<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "\n";
eval("\$str = \"$str\";");
echo $str. "\n";
?>
以上例程會輸出:
This is a $string with my $name in it.
This is a cup with my coffee in it.