由于某种原因,我似乎无法将我的头包裹起来。变量内的变量
$welcome_message = "Hello there $name";
$names_array = array("tom", "dick", "harry");
foreach ($names_array as $this_name) {
$name = $this_name;
echo $welcome_message."<br>";
}
如何每次更新$ welcome_message中的$ name变量?
使用变量变量,但我似乎无法使其工作。
感谢
就使$ WELCOME_MESSAGE分配在循环内。 – Tushar