?
What will be the output if we replace the line $num = preg_grep(“/[0-5]/”, $number); with $num = preg_grep(“/[0-5]/”, $number, PREG_GREP_INVERT);?
Answer & Solution
Correct Answer:
Option
B
When we include PREG_GREP_INVERT, this will invert our data, so instead of outputting numbers it will output our non-numeric values.
Join the Discussion
Login to post a comment or share your explanation.
Login