Programming Languages PHP Objective
Mar 15, 2013

Find the Output?

<?php 

 $color=array("red","yellow","white"); 

 $x=in_array("black",$color); 

 if($x==0) 

 echo "good bye"; 

 if($x==1) echo "Hello"; 

 ?>

Choose the correct answer:
A) hello
B) Error
C) good bye
D) All of the above
Detailed Explanation

Option C is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback