<html>
<body>
<h3 style="color: grey;">next() function example in PHP</h3>
<?php
$subject_list = array('Language', 'Math', 'Science', 'Geography');
$subject = current($subject_list);
echo "Current value : $subject <br />";
$subject = next($subject_list);
echo "next value : $subject <br />";
$subject = next($subject_list);
echo "next value : $subject <br />";
$subject= prev($subject_list);
echo "prev value : $subject <br />";
$subject= end($subject_list);
echo "end value : $subject <br />";
?>
</body>
</html>
|