Hi Guys.
Can you take a look at this code (below):
$text = "Call Mary on 499 012 3456, John on 876 543 2101, or Karen: 777 111 2345";
echo preg_match_all( "/\b\d{3} \d{3} \d{4}\b/", $text, $matches ) . "<br>";
$stuff = "here are some numbers: 2340 093 22";
echo preg_match_all( "/\b\d{4} \d{3} \d{2}\b/", $stuff, $array ) . "<br>";
I am totally confused by this. Obviously, you all know what 'preg_match_all()' does.
What I need to know is,, why does the first echo statement work, and second echo statement doesn't work?
The second echo statement should clearly match '3', but it only echo's '1'.
Totally confused by this!!