$var 的正确语法是什么?我想用它作为尚未存在的数组单元的指定(//代码中的方式):
$array = array (
array("folder" => "november", "name" => "1.jpg"),
array("folder" => "december", "name" => "1.jpg")
);
$var = "$picture['folder']"; // how to make it not a string value and use it in foreach cycle
foreach ($array as $picture) { // only here comes subarray
echo $var;
echo '<br>';
}
/* should be
november
december
*/
PS这是一个简单的图库日历任务,我们回显图像路径...