Page 1 of 1

Hi this is my first post and need help please guru's

Posted: Tue Mar 23, 2010 7:59 am
by deansaddigh

Code: Select all

Parse error: syntax error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' in E:\domains\c\cisukschool.co.uk\user\htdocs\processenrolment.php  on line 131
refers to this line

Code: Select all

else if($durationweeks >=12 && <=23)
Im basically just trying to set a price if the weeks are greater than 12 and less than or equal to 23

Any help would be brilliant
silly me i figured it out its meant to be

Code: Select all

($durationweeks >=12 && $durationweeks<=23)

Re: Hi this is my first post and need help please guru's

Posted: Tue Mar 23, 2010 8:11 am
by pavanesh2009
try it,not sure

($durationweeks >='12' && $durationweeks<='23')
deansaddigh wrote:

Code: Select all

Parse error: syntax error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' in E:\domains\c\cisukschool.co.uk\user\htdocs\processenrolment.php  on line 131
refers to this line

Code: Select all

else if($durationweeks >=12 && <=23)
Im basically just trying to set a price if the weeks are greater than 12 and less than or equal to 23

Any help would be brilliant
silly me i figured it out its meant to be

Code: Select all

($durationweeks >=12 && $durationweeks<=23)

Re: Hi this is my first post and need help please guru's

Posted: Tue Mar 23, 2010 1:21 pm
by Sephern
pavanesh2009 wrote:try it,not sure

($durationweeks >='12' && $durationweeks<='23')
That would turn the numbers into strings, if I'm not mistaken? o.o;
deansaddigh wrote:

Code: Select all

Parse error: syntax error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' in E:\domains\c\cisukschool.co.uk\user\htdocs\processenrolment.php  on line 131
refers to this line

Code: Select all

else if($durationweeks >=12 && <=23)
Im basically just trying to set a price if the weeks are greater than 12 and less than or equal to 23

Any help would be brilliant
silly me i figured it out its meant to be

Code: Select all

($durationweeks >=12 && $durationweeks<=23)
You need to put each clause within its own set of brackets.
So

Code: Select all

 
else if ($durationweeks >=12 && <=23)
 
Would become

Code: Select all

 
else if (($durationweeks >=12) && ($durationweeks <=23))