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

What is prepare in php?

530


Explain how to execute a php script using command line.

564


What is PECL?

785


Can you pass an array into a function?

571


What is Type hinting in PHP?

724






What types of Data Can Be Used as Array Keys?

573


What are the 3 types of sessions?

551


How we get browser details of clients machine?

522


Is array empty php?

508


Write a program in php to print a table of a number?

515


What are php data types?

523


Does wordpress run on php 7?

521


Explain Type juggling?

580


What is the difference between get and post method in php?

505


What is difference between mysql_fetch_array and mysql_fetch_assoc?

505