Maison >développement back-end >tutoriel php >怎么出错了呢?求原理
<?php$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";}