What will be the output of the following PHP code?
<?php
$name = "What is your name?"
if (preg_match("/name/"),$name)
echo "My name is Will Pitt ";
else
echo "My name is not Will Pitt ";
if (preg_match("/are/"))
echo "I am great"
else
echo "I am not great";
?>
<?php
$name = "What is your name?"
if (preg_match("/name/"),$name)
echo "My name is Will Pitt ";
else
echo "My name is not Will Pitt ";
if (preg_match("/are/"))
echo "I am great"
else
echo "I am not great";
?>A. My name is Will Pitt I am great
B. My name is not Will Pitt I am great
C. My name is Will Pitt I am not great
D. My name is not Will Pitt I am not great
Answer: Option C

Join The Discussion