If statement structure in php
Posted
by user305859
on Stack Overflow
See other posts from Stack Overflow
or by user305859
Published on 2010-03-31T09:24:10Z
Indexed on
2010/03/31
9:33 UTC
Read the original article
Hit count: 385
php
|if-statement
Please help - i keep getting an error with this bit of code - it is probibly some thing small but dont seem to see what is wrong -
while($row = mysql_fetch_array($result)) { $varp = $row['ustk_retail']; if ($varp<80000) { $o1 = 1; } if (($varp=>80000) && ($varp<100000)) { $o2 = "1"; } if (($varp=>100000) && ($varp<120000)) { $o3 = "1"; } if (($varp=>120000) && ($varp<140000)) { $o4 = "1"; } if (($varp=>140000) && ($varp<160000)) { $o5 = "1"; } if (($varp=>160000) && ($varp<180000)) { $o6 = "1"; } if (($varp=>180000) && ($varp<200000)) { $o7 = "1"; } if (($varp=>200000) && ($varp<220000)) { $o8 = "1"; } if (($varp=>220000) && ($varp<240000)) { $o9 = "1"; } if (($varp=>240000) && ($varp<260000)) { $o10 = "1"; } if (($varp=>260000) && ($varp<280000)) { $o11 = "1"; } if (($varp=>280000) && ($varp<300000)) { $o12 = "1"; } if ($varp>=300000) { $o13 = "1"; } }
Any ideas would help
© Stack Overflow or respective owner