PHP incrementation of mixed content
<p>please, can you help me with a PHP function that increments mixed content (0-9, a-Z, _, -) like this?</p>

<pre><code>private function increment_mix($id) {
    $chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"

    // I can not figure it out.
}

echo $this-&gt;increment_mix("5"); // 6
echo $this-&gt;increment_mix("Y"); // Z
echo $this-&gt;increment_mix("-"); // 00
echo $this-&gt;increment_mix("00"); // 01
echo $this-&gt;increment_mix("0z"); // 0A
echo $this-&gt;increment_mix("0-"); // 10
echo $this-&gt;increment_mix("mo"); // mp
echo $this-&gt;increment_mix("V--"); // W00
</code></pre>