Single Choice Not Set

QWhat will be the output of the following PHP code?
< ?php 
    $url = "nachiketh@example.com";
    echo ltrim(strstr($url, "@"),"@");
?>

ID: #2401 PHP String and Regular Expression 3,518 views
Question Info
#2401Q ID
Not SetDifficulty
PHP String and Regular ExpressionTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A nachiketh@example.com
  • B nachiketh
  • C nachiketh@
  • D example.com
Correct Answer

Explanation

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

Share This Question

Challenge a friend or share with your study group.