How many elements does the array $matches from the following code contain?

Posted by: Pdfprep Category: 200-710 Tags: , ,

How many elements does the array $matches from the following code contain?

$str = "The cat sat on the roof of their house.";

$matches= preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
A . 2
B . 3
C . 4
D . 7
E . 9

Answer: D

Leave a Reply

Your email address will not be published.