If I // $time=="21" the count goes up by 1 so it's not recognizing the 21.
Any ideas "Olav bringedal" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > --- Josh Edwards <[EMAIL PROTECTED]> wrote: > if I > have $time = 21 then > > > > $timespread > > > =array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); > > if ($time = = "21") > > $timespread[22]=($timespread[22]+1); > > echo $timespread[22] ; > > > > I get 0 > > > > It might be "= =" which should be "==". If not, try: > > $timespread =array > (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); > if ($time == "21") > { > echo "before:".$timespread[22]."<b>" ; > $timespread[22]=($timespread[22]+1); > echo "after:".$timespread[22]."<b>" ; > } > else > { > echo "time is not 21" ; > } > > Then you can at least establish where things go wrong. > > > > > ===== > Olav Bringedal > jaggu.org > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php