"> What will be the output of the following PHP code? < ?php $url = "nachik "> " /> " />
Sail E0 Webinar
Question
What will be the output of the following PHP code?
< ?php
$url = "nachiketh@example.com";
echo ltrim(strstr($url, "@"),"@");
?>
Options:
A .  nachiketh@example.com
B .  nachiketh
C .  nachiketh@
D .  example.com
Answer: Option D


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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers