Discussion Forum : Php Regular Expressions
Question - What will be the output of the following PHP code?$name = "What is your name?";if (preg_match("/name/"),$name)echo "My name is Will Pitt ";elseecho "My name is not Will Pitt ";if (preg_match("/are/"))echo "I am great"else echo "I am not great";
Options:
A .  My name is not Will Pitt I am not great
B .  My name is Will Pitt I am great
C .  My name is not Will Pitt I am great
D .  My name is Will Pitt I am not great
Answer: Option D

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

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