How can we extract string 'techinterviews.com' from a string
'http://www.techinterviews.com' using regular expression in PHP?
Answer Posted / ram
$url = "http://www.techinterviews.com";
$splittedstring = explode ("www.",$url );
$str = $splittedstring[1];
echo $str ;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the environmental variables?
What does php exit do?
What does namespace mean in php?
Which function is used in php to delete a file?
What is the purpose of php?
What are php expressions?
What is overloading and overriding in php?
Why many companies are switching their current business language to php? Where php basically used?
How many types of errors in php?
How to get the IP address of the client/user in PHP?
What is input sanitization in php?
What is $_ server request_method == post?
Does mysql need php?
What does $_ post mean in php?
How to submit form without a submit button.