How can we extract string 'techinterviews.com' from a string
'http://www.techinterviews.com' using regular expression in PHP?

Answer Posted / brett

echo str_ireplace('http://www.','',$url);

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between accessing a class method via -> and via ::?

529


How to call php function from javascript using ajax?

516


What are the advantages of triggers in php?

477


What is PHP? Who is the father or inventor of PHP?

607


What is http get and post?

530






Which function(s) in PHP computes the difference of arrays?

576


Are parent constructors called implicitly inside a class constructor?

514


What is properties of class?

587


When do sessions end?

541


Where is session value stored?

558


What is super keyword in c++?

583


How to block direct directory access in PHP?

553


Is nan in javascript?

518


Is php deprecated?

528


What is the delimiter default in PHP?

609