Anyone know why the following does not return desired results and how to get it to?
Code:
$string = 'a,b,c,d';
if(eregi("(a)|(adf)|(c)",$string,$matchedtext)){
echo $matchedtext[1]; // This returns an "a" which I want
echo $matchedtext[2]; // This is empty, I want it to return a "c"
}