The code works until I try to order the slice with the asort function, I then just get a blank page when I run this. Any ideas?
<?php
$arange = range( 1 , 80, 1);
shuffle($arange);
$shufl = array_slice($arange, 0, 5);
$sortshufl = asort($shufl, SORT_NUMERIC);
foreach ($sortshufl as $number) {
echo "$number ";
}
?>
asort()sorts the array in place and returns a boolean, so your result is in$shufl.Enable PHP error reporting and you’ll avoid the blank pages on errors.