Getting Unexpected '<' in simple less than greater than comparison
- by Elizabeth Buckwalter
I feel very very very silly posting this, but I can't find the answer. I've searched google and here.
// originally values in a multi dimensional array, but used simple values
// to rule out errors.
$somenumber = 1; $anotherone=5;
if ($somenumber < $res->shares < $anotherone ) {
blah
}
Get the error:
Parse error: syntax error, unexpected '<'
Seems pretty simple and straight forward. Is there some weird thing that you can't compare multiple values? Do I have to explicitly type?
It works in Perl. Which of course means that it has to work like this in everything else. ;)