php.js icon indicating copy to clipboard operation
php.js copied to clipboard

sorting array is not working

Open merbin2012 opened this issue 6 years ago • 0 comments

The following sort() method not working please solve this

<?php 
 $numbers = array(30, 71, 5, 29, 17); 
 sort($numbers); 
   
 $arrlength = count($numbers); 
 for($x = 0; $x < $arrlength; $x++) { 
  echo $numbers[$x]; 
  echo "<br>"; 
 }
 
?>

merbin2012 avatar Mar 23 '19 14:03 merbin2012