Re: Parse Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If statements use curly braces. Do this: 


if ($packages == "1"){

if ($airporttransfer == "car")
$airporttransfer2 = "12.00");
if ($airporttransfer == "bus")
$airporttransfer2 = "10.00");
if ($airporttransfer == "none")
$airporttransfer2 = "0.00");

}



On Wed, 2003-02-26 at 16:42, Chris Payne wrote:

> Hi there everyone,
> 
> I'm trying to run an if statement and inside that have other if's, but it keeps telling me I have a parse error on the first if in the if statement (The second if down).  Can anyone see what i'm doing wrong?
> 
> if ($packages == "1")(
> 
> if ($airporttransfer == "car")(
> $airporttransfer2 = "12.00");
> if ($airporttransfer == "bus")(
> $airporttransfer2 = "10.00");
> if ($airporttransfer == "none")(
> $airporttransfer2 = "0.00");
> 
> );
> 
> Thanks for your help :-)
> 
> Chris

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux