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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
deansaddigh
Forum Newbie
Posts: 1
Joined: Tue Mar 23, 2010 7:57 am

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

Post 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)
pavanesh2009
Forum Commoner
Posts: 30
Joined: Wed Jan 13, 2010 7:24 am

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

Post 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)
Sephern
Forum Commoner
Posts: 73
Joined: Sun Jan 04, 2009 4:44 pm

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

Post 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))
 
Post Reply