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 are differences between PECL and PEAR?
What does the unset() function mean?
What is $_ server request_method == post?
What is the role of php.ini file?
How can we access the data sent through the url with the get method?
Explain me what is the use of header() function in php?
Which php function will attach one file to another?
What are php strings?
What does it mean when it says the csrf token is invalid?
How to check an element is exists in array or not in php?
What is the difference between $argv and $argc? Give example?
What is strlen function in php?
Write syntax to open a file in php?
Does exist in php?
Do you know what is the differences between $a != $B and $a !== $B?