Can anyone help me figure out what's wrong with this?
count() returns 1, but print_r shows there are 3 elements in the array! how can i properly count the array elements?
tia.
$string = "fa199.33.222.11sdbsdf56.333.22.666sdfa44.22.333.44";
preg_match_all("/[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/", $string, $matches);
$num=count($matches);
echo 'number of matches= '.$num;
echo '<br />';
print_r($matches);