NextIndexPrevious

Programs in PHP

5. Program to sort elements in an array in ascending order.
<?php

	$arr = array(10,5,8,3,45);
	sort($arr);
	print_r($arr);

?>
Output :
Array ( [0] => 3 [1] => 5 [2] => 8 [3] => 10 [4] => 45 )

Father of PHP

Rasmus Lerdorf

Rasmus Lerdorf

Born: November 22, 1968, Greenland
Google+