Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code ?
    <?php
    function Condition($number)
    {
    if ($number == 3)
    echo "Condition 3rd executed....";
    if ($number == 7)
    echo "Condition 7th executed....";
    if ($number == 8)
    echo "Condition 8th executed....";
    if ($number == 19)
    echo "Condition 19th executed....";
    }
    $var = stripos("I know the php, And I love to know php!","the");
    Condition($var);
    ?>
    1. Condition 3rd executed....
    2. Condition 7th executed....
    3. Condition 8th executed....
    4. Condition 19th executed....
    5. None of these
Correct Option: B

The stripos() function finds the position of the first occurrence of a string inside another string. In this case it returns 7.



Your comments will be displayed only after manual approval.