Your code is terribly hard to read; please practice appropriate indentation, and don't over-comment.
Anyway, try changing this part...
...to just this...Code:ereg($ToFindNow, $ToLookNow, $Matches); //**CHECK THE TWO STRINGS TO SEE IF THEY MATCH, AND PUT THE RESULT INTO ARRAY Matches**\\ //if($Matches[0] == $ToFindNow) //if (In_String($ToFindNow,$ToLookNow,1)) if((int)$Matches[0] == (int)$ToFindNow)
If a match is found, the if statement will evaluate to something non-false; you don't need to check the $Matches array.Code:if(ereg($ToFindNow, $ToLookNow, $Matches))
Also note that ereg() is "DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged."




Reply With Quote