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

Answer Posted / sunil kumar

echo
strstr("http://www.techinterviews.com","techinterviews.com");

Is This Answer Correct ?    8 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain me how to include a file to a php page?

546


What is url encoding and decoding in php?

558


Do you know what is use of count() function in php?

524


What is interface? Why it is used?

545


What is strlen php?

547






How many types of session are there?

544


What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?

512


Tell me what are sql injections, how do you prevent them and what are the best practices?

511


Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?

526


Why php 7 is faster?

516


Is php 7 backwards compatible?

603


What is json php?

538


What are the benefits of composer?

537


What are the ways to include file in php?

526


How to get best php developer Experience in Php with Sugar CRM / VTiger.

3975