How can I reset an array in PHP?
Answer Posted / ram
The reset () function moves the internal pointer to the
first element of the array. This function returns the value
of the first element in the array on success, or FALSE on
failure.
Syntax: reset(array)
<?php
echo date("Y-m-d");
$people = array("Prasad", "Ram", "vidhya");
echo current($people) . "<br />";
echo next($people) . "<br />";
echo reset($people);
?>
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
Explain Whitespace Characters?
What are the functions of string?
What does $_cookie mean?
Is php difficult to learn?
What is var_dump?
Where to put php files in apache server?
Tools used for drawing er diagrams?
How a variable is declared in php?
What is a persistence cookie?
What would occur if a fatal error was thrown in your php program?
What will the ?getdate() function returns in PHP?
What is difference between echo and print_r in php?
Is php an api?
Explain about require and include function?
How are php sessions stored?