NextIndexPrevious

Programs in PHP

3. foreach example to access every element of an Array.
<?php

	$arr = array(10,20,30,40,50);
	
	foreach($arr as $v)
	{
		echo $v;
		echo "<br>";
	}
	
?>
Output :

10
20
30
40
50

Father of PHP

Rasmus Lerdorf

Rasmus Lerdorf

Born: November 22, 1968, Greenland