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
How to break a file path name into parts?
What is a persistent cookie in php?
What are computer variables?
How do I find environment variables?
What are php filters?
What is the difference between for and foreach loop in php?
Is php closing tag necessary?
How easy is php?
What is mean by an associative array?
Explain the difference between mysql_connect and mysql_pconnect?
What is array filter in php?
Is php secure?
What is the difference between explode () and split () functions in php?
How to pass an argument to a function?
How to split a string into array using php?