Discussion Forum : Php Regular Expressions
Question - What will be the output of the following PHP code?$str = "Hello! My name is Cameron Fox. Coffee?";$find = array('/is/','/coffee/');$replace = array('/was/','/tea/');echo preg_replace ($find, $replace, $str);
Options:
A .  Hello! My name was Cameron Fox. Coffee?
B .  Hello! My name is Cameron Fox. tea?
C .  Hello! My name is Cameron Fox. Coffee?
D .  Hello! My name was Cameron Fox. tea?
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *