"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $author = "nachiketh@example.com";

    $author = str_replace("a","@",$author);

    echo "Contact the author of this article at $author.";

    ?>

  2. A.

     Contact the author of this article at nachiketh@ex@mple.com

    B.

     Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com

    C.

     Contact the author of this article at n@chiketh@ex@mple.com

    D.

     Error

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The str_replace() function case sensitively replaces all instances of a string with another.


Be The First To Comment