Re: Odd Parse Error
| From: | liljim | Date: | Mon, 24 Mar 2003 10:33:49 +0000 |
| Subject: | Re: Odd Parse Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140821@lists.php.net to get a copy of this message | ||
You have a curly brace, where you should have a square bracket:
> if ($values{$i] != 0){ //line 137
if($values[$i]) {
James
"Shaun" <shaun@mania.plus.com> wrote in message
news:20030324102401.19768.qmail@pb1.pair.com...
> Hi,
>
> 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]."')";
> }
> }
>
> thanks in advance for your help
>
>