niklasvh / php.js

PHP to JavaScript converter and VM written in JavaScript
http://phpjs.hertzen.com
MIT License
860 stars 115 forks source link

sorting array is not working #71

Open merbin2012 opened 5 years ago

merbin2012 commented 5 years ago

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>"; 
 }

?>