Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How many types of array supported in php?

1033


What is local variable in php?

1027


What is the difference between abstract class and interface in php?

1216


What are session variables in php?

1103


Explain me what is the use of header() function in php?

1083


Is php 5 still supported?

1045


When sessions ends?

1002


Does php 5 support exceptions?

1190


Tell us what does $_cookie means?

1054


How many data types are there in php?

1140


Who created numbers?

1027


Explain the different types of errors in php.

1138


Write a program to upload a file in php?

1061


Where can I learn php?

990


How to set cookies?

1061