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 is php call function?

941


What is the apache?

948


Tell me when a conditional statement is ended with an endif?

903


Explain how to submit form without a submit button.

955


What is php addslashes?

1099


What are php filters?

959


Is it possible to remove the html tags from data?

913


What is __ invoke in php?

992


Tell me what are the encryption techniques in php?

943


What are the features of php?

1025


Why shouldn't I use mysql_* functions in php?

1079


What is isset php?

963


What are the string function in php?

974


Do you know what is the use of rand() in php?

983


What is the difference between single quoted string and double quoted string?

1096