I have recently been getting a parse error that reads :
Parse error: parse error in C:\wamp\www\Jumble.php on line 20
Anytime I run an HTML program on my wamp server and it is regarding a php file called Jumble.php which is supposed to arrange the data entered into the HTML file. The HTML file seems to work spot on so i won't bother you with it's code but I will post the code for Jumble.php in the hopes that someone else can see what I am unable to find:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Word Jumble</title>
<body>
<?php
error_reporting(E_ALL & ~E_NOTICE);
function DisplayError($fieldName, $errorMsg) {
echo "Error for \"$fieldName\": $errorMsg<br \>\n";
++$errorCount; }
function wordCheck($data, $fieldName) {
global $errorCount;
if (empty($data)) {
displayError($fieldName, "You must enter a word here between 4 and 7 characters");
$retval = "";}
else {
$retval = trim($data);
$retval = striplashes($retval);
****line 20**** if (strlen(($retval)<4)) || (strlen($retval)>7)) {
displayError($fieldName, "Must be between 4 ans 7 characters in length");}
if (preg_match("/^[a-z]+$/i", $retval)==0){
displayError($fieldName, "Words must be letters only");
}
}
$retval = stroupper($retval);
$retval = str_shuffle($retval);
reutrn($retval);
}
$words[] = wordCheck($_POST["word 1"], "word 1");
$words[] = wordCheck($_POST["word 2"], "word 2");
$words[] = wordCheck($_POST["word 3"], "word 3");
$words[] = wordCheck($_POST["word 4"], "word 4");
if ($errorCount>0)
echo "Please re-enter data.<br />\n";
else {
$wordnum = 0;
foreach ($words as $Word)
echo "Word ", ++$wordnum.": $Word<br />\n";
}
?>
</body>
</html>
Line 20 is where the error is saying I am having issues but I cannot for the life of me see what would be causing it!! PLEASE HELP ME!!!!:confused: