作者:白羊蓝色雨线 | 来源:互联网 | 2017-05-14 01:38
怎么出错了呢?求原理本帖最后由abu_sec于2013-05-2114:26:40编辑<?php$colors array(red>hongse, blue>lanse, green>lvse, yellow
怎么出错了呢?求原理
本帖最后由 abu_sec 于 2013-05-21 14:26:40 编辑
$colors = array('red'=>'hongse', 'blue'=>'lanse', 'green'=>'lvse', 'yellow'=>'huangse');
foreach ($colors as $color) {
echo "Do you like $color['red']?\n";
?>
分享到:
------解决方案--------------------
$colors = array('red'=>'hongse', 'blue'=>'lanse', 'green'=>'lvse', 'yellow'=>'huangse');
foreach ($colors as $color) {
echo "Do you like $color?\n";
}