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

What are the differences between GET and POST methods?

1000


What are the advantages of php?

967


What is the difference between implode() and explode() in php?

955


Can we extend multiple classes in php?

981


What are soundex() and metaphone() functions in php?

852


Which is the best web server?

932


What is the output of the following php code?

885


Explain me what is x+ mode in fopen() used for?

955


Tell me how can we change the maximum size of the files to be uploaded?

928


Explain PHP?

1008


What is php session start?

968


Is age an interval or ratio?

911


Why constructor is not overridden?

920


Which is better python or php?

953


Do you know what is the function func_num_args() used for?

973