Else If
Posted: Fri Mar 05, 2010 6:15 am
I have the following else if statement (i edited out most of the echo):
I am unsure about the brackets used in the statement i.e.
As the code runs but not exactly as it should but doesn't stop the page from loading...
Am i using the brackets right in the Else If statement?
Code: Select all
if ($days>2 && ($item['statusid']<2) && ($_SESSION['level']>2)) [color=#FF0000]{[/color]
echo "<tr style=\"color:green;\".............
[color=#FF0000]}[/color] elseif ((($date2-$date1)/60)>-15 && $item['date']==NULL) [color=#FF8000]{[/color]
echo "<tr style=\"color:orange;\".............
[color=#FF8000]}[/color] elseif ($item['priority']==1 && ($_SESSION['level']>2)) [color=#FF0000]{[/color]
echo "<tr style=\"color:red;\".............
[color=#FF0000]}[/color] elseif ($item['statusid']==15 && ($_SESSION['level']>2)) [color=#FF0000]{[/color]
echo "<tr onclick=\"document.location='viewcall.php?id=".............
[color=#FF0000]}[/color] elseif ($_SESSION['level']>2) [color=#FF8000]{[/color]
echo "<tr onclick=\"document.location='viewcall.php?id=".............
[color=#FF8000]}[/color] else [color=#FF0000]{[/color]
echo "<tr onclick=\"document.location='viewcall.php?id="............
[color=#FF0000]}[/color]Code: Select all
if [color=#FF0000]([/color]$days>2 && [color=#0000FF]([/color]$item['statusid']<2[color=#0000FF])[/color] && [color=#008000]([/color]$_SESSION['level']>2[color=#008000])[/color][color=#FF0000])[/color]Am i using the brackets right in the Else If statement?