|
getting a parse error with this line, boolean.
Date: 04/09/05
(PHP Community) Keywords: no keywords
Ok, first off, I am not that adept at coding, but I like to play around for fun and experiment with stuff, so I'm sure my code is not the 'best' or simplest, or most elegant way to do things. It is likely clumsy, and probably the reason i am having this parsing error. If you could help me figure out what is wrong with this line of code, I would appreciate it. I get the following error at this line:
Parse error: parse error, unexpected T_BOOLEAN_AND
this is the line it points to:
if ((((q1+q2) > 11) && ((q1+q2) <=18)) && (((q3+q4) > 3) && ((q3+q4) <=6))) && ((((q7+q10) > 3) && ((q7+q10)<= 6)) && (((q5+q11) > 5) && ((q5+q11) <=8))){ $cheese_message = 'you are an apple '; }
elseif ((((q1+q2) > 11) && ((q1+q2) <=18)) && (((q3+q4) > 3) && ((q3+q4) <=6))) && ((((q7+q10) > 3) && ((q7+q10)<= 6)) && (((q5+q11) >=0) && ((q5+q11) <=5))){ $cheese_message = 'you are a pear '; }
....
the function continues like this for about 12 lines. But the problem was indicated as being T-BOOLEAN_AND so I assume it has something to do with my &&'s. Am I using too many of them? Is there a better way to write this? I appreciate your help. Thanks!
Source: http://www.livejournal.com/community/php/282763.html
|