What will be the output of the following PHP code?
<?php
$url = "contact@examveda.com";
echo ltrim(strstr($url, "@"),"@");
?>
<?php
$url = "contact@examveda.com";
echo ltrim(strstr($url, "@"),"@");
?>
A. contact@examveda.com
B. contact
C. contact@
D. examveda.com
Answer: Option D
Solution(By Examveda Team)
The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string.Related Questions on Regular Expressions
A. 1 and 2
B. 2 and 4
C. 1 and 4
D. 2 and 3
Join The Discussion