programming-examples/php/Arrays/PHP script which will display the colors.php

14 lines
190 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?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>";
?>