programming-examples/php/Arrays/PHP script which will display the colors.php
2019-11-15 12:59:38 +01:00

14 lines
190 B
PHP

<?php
$color = array('white', 'green', 'red');
foreach ($color as $c)
{
echo "$c, ";
}
sort($color);
echo "<ul>";
foreach ($color as $y)
{
echo "<li>$y</li>";
}
echo "</ul>";
?>