Get a random # between 10 and 100 using a loop and push function. Create an array of random numbers from 50 to 300 using the function below to print out ascending and descending
<?php
$arrayName = array(23, 19, 14, 66);
$a = count($arrayName);
for($i = $a-1; $i >= 0 ; $i--) {
echo $i."=>".(--$arrayName[$i])."<br>";
};
Aucun commentaire:
Enregistrer un commentaire