I am learning strings and its not the most pleasant part of PHP. Here is the scenario. the descriptions of EREG() and EREGI() on php.net are VERY misleading. They keep using the word "matches." well, ereg doesn't find matches, it only finds one "match." My question is, how do I make it find more than one match and stick it in an array? here is some sample code:
$string = "my name is blue and the sky is blue";
ereg("blue", $string, $arr);
echo ("$arr[0]");
this returns only one instance of "blue" in the array. [0] contains the instance. [1] or any reference after 0 contains nothing.
Any ideas?
blue