Re: Odd Parse Error
| From: | Ernest E Vogelsinger | Date: | Mon, 24 Mar 2003 10:39:00 +0000 |
| Subject: | Re: Odd Parse Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140822@lists.php.net to get a copy of this message | ||
At 11:24 24.03.2003, shaun said:
--------------------[snip]--------------------
>Using the following code i get a parse error for line 137, and i cant see
>anything wrong with it, i would be very grateful for someones help here!
>
>if ($num > 0){
> if ($values[$i] == 0){
> $query = "DELETE FROM WMS_Allocatations WHERE User_ID =
>'".$_GET[user_id]."' AND Project_ID =
>'".$fields[$i]."'";
> }
>} else {
> if ($values{$i] != 0){ //line 137
> $query = "INSERT INTO WMS_Allocatations (User_ID, Project_ID) VALUES
>('".$_GET[user_id]."', '".$fields[$i]."')";
> }
>}
--------------------[snip]--------------------
Shouldn't that be
if ($values[$i] != 0){ //line 137
Note the curly vs. square brackets in $values
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/