Re: [PHP] Newbie - Spot the error

2002-05-15 Thread Olav Bringedal
--- 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:

Re: [PHP] Newbie - Spot the error

2002-05-15 Thread Josh Edwards
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

Re: [PHP] Newbie - Spot the error

2002-05-15 Thread Shaun Thomas
On Wed, 15 May 2002, Josh Edwards wrote: $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] ; It should be ==, not = =. Secondly, you don't need to quote the 21, it's a number. You should use