PHP: Convert map string into variables
<p>I have a map from jquery:</p>

<pre><code>82|81|83|84|85|86|87|88|89
</code></pre>

<p>I need to cycle through this map and use it in a mysql query, I want to do a while loop so that in the first iteration:</p>

<pre><code>$ID = 82; $Position = 1;
</code></pre>

<p>second iteration:</p>

<pre><code>$ID = 81; $Position = 2;
</code></pre>

<p>third iteration:</p>

<pre><code>$ID = 83; $Position = 3;
</code></pre>

<p>... and so on. Thanks.</p>
