i'm using the datecheck () ereg function inside of a while loop and its giving me this error.
here's the function:
function datecheck($intext) {
$result = ereg("([0-9]{1,2})-([0-9]{1,2})-([0-9]{4})", $intext, $trashed);
if ($result) { $isamatch = ""; } else { $isamatch = "No - NOT A MATCH"; }
echo("\"$intext\" $isamatch<br>\n");
}
here' s the error:
Fatal error: Cannot redeclare datecheck() (previously declared in /home/username/public_html/folder/thanks2.php:332) in /home/username/public_html/folder/thanks2.php on line 332
when i take the function outside of the loop, the form on the page just keeps copying itself all the way down the page, i'm guessing it has something to do with the loop, but i'm not sure whats going on with it, and why its giving me this error if
i don't have 2 functions with the same name? also i don't have an include file with the same function in that file.
can anyone tell me how i could fix this so that i don't get this error?
thanks