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
How to find a specific value in an array?
What are the advantages and disadvantages of cascade style sheets?
What are php libraries?
Why laravel is the best php framework in 2019?
What is the use of session and cookies in php?
Where sessions stored in PHP?
What are php filters?
What is difference between mysqli and mysql?
How do I know my xampp version?
What is the advantage of runtime polymorphism?
Difference between array_combine and array_merge?
What is php simple definition?
How many data types are used by php?
What is the main difference between require() and include()?
How to get a random value from a php array?