PHP: Split array values to key and value : <p>I have a txt file which contains:</p>

<pre><code>1:2
2:5
3:10
4:1
</code></pre>

<p>I need to be able to add to these numbers. For example I want to add to the last line +5:</p>

<pre><code>1:2
2:5
3:10
4:6
</code></pre>

<p>How can I achieve this? I was wondering if the right way was to input the file into an array but I have no idea how to do this as I need to separate the numbers into keys and values, I guess?</p>
