Add to an array value (+1)
<p>I have an array</p>

<pre><code>$hourly = array(
        "01" =&gt; "0",
        "02" =&gt; "0",
        "03" =&gt; "0",
        "04" =&gt; "0",
        "05" =&gt; "0",
        "06" =&gt; "0",
        "07" =&gt; "0",
        "08" =&gt; "0",
        "09" =&gt; "0",
        "10" =&gt; "0",
        "11" =&gt; "0",
        "12" =&gt; "0",
        "13" =&gt; "0",
        "14" =&gt; "0",
        "15" =&gt; "0",
        "16" =&gt; "0",
        "17" =&gt; "0",
        "18" =&gt; "0",
        "19" =&gt; "0",
        "20" =&gt; "0",
        "21" =&gt; "0",
        "22" =&gt; "0",
        "23" =&gt; "0"
            );
</code></pre>

<p>And I have a bunch of data like "01" and "03" and "21" and I want to add (+1) to that specific value in the array. So with the data set "01","03","21","01","22" the resulting array would be</p>

<pre><code>$hourly = array(
        "01" =&gt; "2",
        "02" =&gt; "0",
        "03" =&gt; "1",
        "04" =&gt; "0",
        "05" =&gt; "0",
        "06" =&gt; "0",
        "07" =&gt; "0",
        "08" =&gt; "0",
        "09" =&gt; "0",
        "10" =&gt; "0",
        "11" =&gt; "0",
        "12" =&gt; "0",
        "13" =&gt; "0",
        "14" =&gt; "0",
        "15" =&gt; "0",
        "16" =&gt; "0",
        "17" =&gt; "0",
        "18" =&gt; "0",
        "19" =&gt; "0",
        "20" =&gt; "0",
        "21" =&gt; "1",
        "22" =&gt; "1",
        "23" =&gt; "0"
            );
</code></pre>

<p>How could I go about doing that? Is there a function to add 1 to an array element?</p>
