PHP Programs

Please click on 1-2 Ads to keep this website's Study Material FREE and regularly Updated.

Program 16: Write a PHP program to get the first element of the array ($color = array(4=>'white', 6=>'green', 11=>'red')).

first_element.php

<!DOCTYPE html>
<html>
<head>
	<title>PHP Programs TutorialDuniya.com</title>
</head>
<body>
	<?php
		$color = array(4=> 'white', 6=> 'green', 11=>'red');
		echo reset($color)."\n";
	?>
</body>
</html>



If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.