這張圖片怎麼了?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