Chaitanya Lakshmi
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us

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

2/27/2012

1 Comment

 
  • substr($email, strpos($email, “@”));
  • strstr($email, “@”);
  • strchr($email, “@”);
  • substr($email, strpos($email, “@”)+1);
  • strrpos($email, “@”);
  • I don’t know
Answer:
substr($email, strpos($email, “@”)+1);

1 Comment
Vinícius Feitosa
9/16/2013 03:39:51 am

Does'n " strstr($email, “@”); " will works, too?

Reply



Leave a Reply.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    February 2012

    Categories

    All
    General
    Krds
    Phponweb

    RSS Feed

Powered by Create your own unique website with customizable templates.