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 are the features of php 7?

507


"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.

1532


Php being an open source is there any support available to it?

555


Is php a low level language?

537


How can we connect to a mysql database from a php script?

533






Who is the father or inventor of php?

585


What does csrf token mean?

512


What is http get and post?

535


How to create a table using php?

544


How to set session.gc_divisor properly?

599


What is the difference between echo print and print_r in php?

520


What is the difference between $argv and $argc? Give example?

512


What is global array in php?

575


What is php and its uses?

512


How to include variables in double-quoted strings?

513