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
Are php session secure?
How to open a file in php?
What is urlencode and urldecode in php?
Which php framework is fastest?
Explain array_uintersect()?
Is php 7.0 stable?
How to download and install php for windows?
What is the difference between for and foreach in php?
What is parent __construct ();?
Define object-oriented methodology?
Explain the importance of the function htmlentities.
What are the benefits of using php?
What are the characteristics of php?
How to delete an element from an array?
How are variables declared in php?