"> What will be the output of the following PHP code ?<?php$Country

Home » PHP » PHP For Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $Country = array("INDIA","USA","ENGLAND");
    foreach ($Country as $val)
    {
    echo "$val \n";
    }
    ?>
    1. Error
    2. INDIA
    3. Nothing
    4. INDIA
      USA
      ENGLAND
    5. None of these
Correct Option: D

This runs a for loop for that array.



Your comments will be displayed only after manual approval.