Programming Languages PHP Objective
Mar 15, 2013

Given a variable $email containing the string user@example.com, which of the following statements would extract the string example.com?

Choose the correct answer:
A) substr($email, strpos($email, "@"));
B) strstr($email, "@");
C) strchr($email, "@");
D) substr($email, strpos($email, "@")+1);
Detailed Explanation

Option D is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback