Source Code:
(back to article)
<?php $colors = array("red" => "#FF0000", "green" => "#00FF00", "blue" => "#0000FF"); foreach ($colors as $color => $hex) { if ($color == "green") { echo "$color has hex code $hex"; break; } } ?>
Result:
Report an issue