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 arrays are passed through arguments?
What is meant by ‘passing the variable by value and reference' in php?
What are the uses of php language?
What is difference between action hook and filter hook?
Is string php function?
What are session variables in php?
Can we use get instead of post?
How to check if a string contains a character or word in php?
Is php easier than javascript?
What is the difference between print() and echo()?
What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?
What are the 3 types of sessions?
What are the methods of array in java?
How to create a session? How to set a value in session?
How do you find the length of a string in php?