The foreach construct provides an easy way to
iterate over arrays and it used to loop through each key/value pair in an array.
Output:
Jignesh
Kishan
Pankaj
Chirag
Vijay
Source Code:
Output:
Jignesh
Kishan
Pankaj
Chirag
Vijay
Source Code:
<?php
$names = array("Jignesh","Kishan","Pankaj","Chirag","Vijay");
foreach ($names as $value)
{
echo "$value <br />";
}
?>
0 comments :
Post a Comment