8 Foreach loop in PHP

Program:

<?php

$arr = array(1,2,3,4,5);

foreach ($arr as $value)
{
    echo $value." ";
}
?>

Output:

 Foreach loop in PHP

Previous
Next Post »