Discussion Forum : Php Regular Expressions
Question - What will be the output of the following PHP code?$number = array(0,1,two,three,four,5);$num = preg_grep("/[0-5]/", $number);print_r($num);
Options:
A .  Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5)
B .  Array([0]=>0 [1]=>1 [5]=>5)
C .  Array([2]=>two [3]=>three [4]=>four)
D .  Array([1]=> 1)
Answer: Option B

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

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