Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code ?

    <?php

    function email()

    {

    $email = ’contact@examveda.com’;

    $new = strstr($email, ‘@');

    echo $new;

    }

    email();

    ?>

  2. A.

     contact

    B.

     contact@examveda.com

    C.

     @examveda.com

    D.

     examveda.com

    View Answer

    Workspace

    Answer : Option C

    Explanation :

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


Be The First To Comment