Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain Whitespace Characters?

1040


What are the functions of string?

983


What does $_cookie mean?

1007


Is php difficult to learn?

925


What is var_dump?

1010


Where to put php files in apache server?

965


Tools used for drawing er diagrams?

993


How a variable is declared in php?

947


What is a persistence cookie?

936


What would occur if a fatal error was thrown in your php program?

1046


What will the ?getdate() function returns in PHP?

1077


What is difference between echo and print_r in php?

878


Is php an api?

971


Explain about require and include function?

981


How are php sessions stored?

966