这张图片怎么了?PHP变量在阵列问题
$appleVar = 'apple';
$veggie = 'carrots';
$var = array('fruit' => $appleVar, 'veggie' => ''.$carrotVar.' no carrots please');
print_r($var);
当我只打印数组时,显示“no carrots please”。为什么?
我很抱歉,我的意思
$carrotVar = 'carrots'; not $veggie = 'carrots';
$ carrotVar从哪里来?或者应该是$ veggie – bumperbox 2011-04-13 11:08:27