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

How can we get ip address of a client in php?

1011


What are the advantages of using php?

1014


What is session in c#?

1031


What are php magic methods/functions?

1041


How to get ip address of clients machine?

1035


What is $_ request?

1029


What is default session time and path in PHP. How to change it?

1070


Do you know what are traits?

1066


Which is the dependent variable?

967


Can the value of a constant change during the script's execution?

1025


Explain how can php and javascript interact?

1086


What is the difference between single-quoted and double-quoted strings in php?

1170


What is singleton pattern in php?

944


What is the mysql injection?

1047


What is varchar mysql?

1246