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 the difference b/w static and dynamic websites?
What is the output of the ucwords function in this example?
How to take a substring from a given string in php?
What is whitespace in php?
Code to upload a file in PHP?
How many types of functions are there in php?
How to track user logged out or not? When user is idle?
Is null empty php?
Explain me what is the goto statement useful for?
How to create and destroy cookies in php?
How can we create a database using php?
How do you end a session in php?
What is associative array in php?
Which function is used to read a file removing the html and php tags in it upwork?
What is difference between html and php?