Home » PHP » PHP For Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $name = array("Neha", "Sumi", "Abhay");
    for (;count($name) < 5;)
    {
    if (count($name) == 3)
    print $name;
    }
    ?>
    1. Error
    2. Nothing
    3. Neha
    4. Abhay
    5. Sumi
Correct Option: A

Array to string conversion error.



Your comments will be displayed only after manual approval.