PHP: How to change foreach array index $key count to 1 instead of 0
<p>I have a foreach loop with an array value, my problem is i need to make the value of $key starts with 1 instead of 0.</p>

<p>My code</p>

<pre><code>if(isset($_POST['sp_criteria'])){
        $sp_criteria = $_POST['sp_criteria'];
        $sp_criterias = array();
        $count = 1;
        foreach ($sp_criteria as $key =&gt; $value) {
            $sp_criterias[$count] = $value;
            $count++;
        }
    }
</code></pre>

<p>And the output</p>

<pre><code>[0] - 10 sp_criteria
[1] - 15 sp_criteria
[2] - 15sp_criteria
[3] - 20 sp_criteria
[4] - 25 sp_criteria
[5] - 15 sp_criteria
</code></pre>

<p>And how do i make it to like this?</p>

<pre><code>[1] - 10 sp_criteria
[2] - 15 sp_criteria
[3] - 15sp_criteria
[4] - 20 sp_criteria
[5] - 25 sp_criteria
[6] - 15 sp_criteria
</code></pre>