Re: simple ereg question
| From: | Robert E. Harvey, M.D. | Date: | Mon, 24 Feb 2003 00:11:26 +0000 |
| Subject: | Re: simple ereg question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136790@lists.php.net to get a copy of this message | ||
Ernest E Vogelsinger wrote:
At 01:01 24.02.2003, Robert E. Harvey, M.D. said: --------------------[snip]--------------------Bob Harveyif (is_numeric($_POST["gamt_$i"]) or empty($_POST"gamt_$i")) or this: if (is_numeric($_POST["gamt_$i"]) || empty($_POST"gamt_$i")) I get this error message (my if statement is on line 5): *Parse error*: parse error, unexpected '\"', expecting ')' in */var/www/html/calc/pad_test.php* on line *5 * Now, where did that come from?--------------------[snip]-------------------- try to always use square brackets when accessing an array element, like if (is_numeric($_POST["gamt_$i"]) or empty($_POST["gamt_$i"])) or this: if (is_numeric($_POST["gamt_$i"]) || empty($_POST["gamt_$i"])) That did it! Thank you, Professor!