"> What will be the output of the following PHP code?<?php$url

Home » PHP » PHP Strings » Question
  1. What will be the output of the following PHP code?
    <?php
    $url = "interview@mania.com";
    echo ltrim(strstr($url, "@"),"@");
    ?>
    1. interview@mania.com
    2. interviewmania.com
    3. interview.com
    4. mania.com
    5. None of these
Correct Option: D

The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string.



Your comments will be displayed only after manual approval.