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 can we get ip address of a client in php?
What are the advantages of using php?
What is session in c#?
What are php magic methods/functions?
How to get ip address of clients machine?
What is $_ request?
What is default session time and path in PHP. How to change it?
Do you know what are traits?
Which is the dependent variable?
Can the value of a constant change during the script's execution?
Explain how can php and javascript interact?
What is the difference between single-quoted and double-quoted strings in php?
What is singleton pattern in php?
What is the mysql injection?
What is varchar mysql?