Hi,
I am using an if statement but the operator is a variable, but php doesn’t seam to like is and i get this error msg: –
Parse error: syntax error, unexpected T_VARIABLE in xxx on line 616
The code is this: –
[code=php]
//Form: –
<select name=”whereOperator2″>
<option value=”==”>Equal to</option>
<option value=”>”>Greater than</option>
<option value=”<“>Less than</option>
</select>
//Code Line 616
if ($data[$whereColumn] $whereOperator $whereClause)
Any gd ideas to get around it other than creating another if statement of the 3 variables in the select i.e
[code=php]
if ($whereOperator == ‘==’) {
if ($data[$whereColumn] == $whereClause) {
//code
}
} else if ($whereOperator == ‘>’) {
if ($data[$whereColumn] > $whereClause) {
// and so on
Thanks
Adam