变量变量的正确语法是:
${"check" . $counter} = "some value";
但是,我 强烈不鼓励
这样做。您试图完成的任务很可能可以通过使用arrays来解决。用法示例:
// Setting values$check = array();for ($counter = 0; $counter <= 67; $counter++){ echo $counter; $check[] = "some value";}// Iterating through the valuesforeach($check as $value) { echo $value;}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)