PHP Programing language

Write a Program to Return the current element in an array
Previous Home Next
<title>Return the current element in an array</title>
$city = array("Allahabad", "Kanpur", "NewDelhi");
print_r($city );
$city  = current($city ); // returns "Allahabad"
echo "City:$city<br />";
$city = next($city); // returns "Kanpur"
echo "City: $city<br />";
$city = prev($city); // returns "NewDelhi"
echo "City: $city<br />";



Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Comment / Feedback: