Home » PHP » PHP Strings » Question
  1. What will be the output of the following PHP code?
    <?php
    $contact = "inter0view@mania.com";
    $contact = str_replace("0","@",$contact);
    echo "Contact to the Interview Mania web designer at $contact.";
    ?>
    1. Error
    2. Nothing
    3. Contact to the Interview Mania web designer at inter@view@mania.com.
    4. Contact to the Interview Mania web designer at inter0view@mania.com.
    5. None of these
Correct Option: C

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



Your comments will be displayed only after manual approval.