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
What are the differences between GET and POST methods?
What are the advantages of php?
What is the difference between implode() and explode() in php?
Can we extend multiple classes in php?
What are soundex() and metaphone() functions in php?
Which is the best web server?
What is the output of the following php code?
Explain me what is x+ mode in fopen() used for?
Tell me how can we change the maximum size of the files to be uploaded?
Explain PHP?
What is php session start?
Is age an interval or ratio?
Why constructor is not overridden?
Which is better python or php?
Do you know what is the function func_num_args() used for?