help with arrays
| From: | Josh Edwards | Date: | Thu, 16 May 2002 08:59:50 +0000 |
| Subject: | help with arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-97879@lists.php.net to get a copy of this message | ||
This is a basic question but I'm a basic fellow. If I have an array
$timespread = array("12am-01am"=>0);
$timespread["01am-02am"]=0;
$timespread["02am-03am"]=0; etc
Using $time which is a number, I want to add 1 to the value of
$timespread[$time] without changing the key so if $time =1
I want to have $timespread["01am-02am"]=1;
Using $timespread[$time]+=1; doesn't work.
any ideas?