How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP

Answer Posted / navneet singh

$url = "http://info@abc.com"
$domain = strstr($url,"@");
echo $domain

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we extend two classes in php?

719


What is php namespace?

713


What are computer variables?

696


What is a comment in php?

806


How to assigning a new character in a string using php?

736


What is htmlentities function in php?

687


What is mysql_fetch_array?

707


What are string functions?

665


Can we use get instead of post?

687


What is the definition of a session?

737


What is the difference between include and require?

712


Can php run without server?

734


What is include in php?

711


What is the difference between client-side and server-side programming?

724


How many types of php frameworks are there?

679