Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code ?
    <?php
    function fun()
    {
    $EmailId1 = "Interview@Mania.com";
    $EmailId2 = strstr($EmailId1, '@');
    echo $EmailId2;
    }
    fun();
    ?>
    1. Interview@Mania.com
    2. Error
    3. Nothing
    4. @Mania.com
    5. None of these
Correct Option: D

The strstr() function searches for the first occurrence of a string inside another string.



Your comments will be displayed only after manual approval.