parse $_SERVER['argv'] into a single array, best method?
<p>I need to parse the $_SERVER['argv'] array into a single array.</p>

<p>I can decide how to get the parameters. </p>

<p>So for example the script was called like this: <code>php script.php name:jack operation:full</code></p>

<p>I get the parameters in $_SERVER['argv'] like this:</p>

<pre><code>Array
(
    [0] =&gt; script.php
    [1] =&gt; name:jack
    [2] =&gt; operation:full_res
)
</code></pre>

<p>How can I easily move those parameters into one array that would be like this:</p>

<p>$param :</p>

<pre><code>Array(['name'] =&gt; jack ['operation'] =&gt; full_res)
</code></pre>
