How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP
Answer Posted / gaurav
you can use array split
$site_arr=split("@", "http://info@abc.com");
$site_name=$site_arr[1];
$site_name will have the value abc.com.
Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
What is $_ request in php?
What Is a Persistent Cookie?
What is difference between echo and print in php?
What is strcmp?
Which is true about the singleton design pattern?
Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?
How do you sort an array in php?
What is the difference between the functions strstr() and stristr()?
How to avoid the undefined index error?
How to access a Static Member of a Class in PHP?
What is a substring in php?
What are php keywords?
How to count all the lines of code in a directory and sub folder?
Explain the importance of the function htmlentities.
What are the different opening and closing tags available in PHP?