Convert a PHP String to a Keycode String
<p>I need to take a string and convert each character in the string to it's Keyboard code using PHP.</p>

<p>So for an example <code>Dave</code> would turn into <code>68,61,76,65</code></p>

<p>I have a client who insist on using one of those JavaScript scramblers which converts an Email into the keycodes, then the JavaScript below re=creates the email address and add's it to the screen</p>

<p><code>emailriddlerarray</code> is the user's email address with each character converted to the keycode</p>

<pre><code>var emailriddlerarray=[68,97,118,105,100,67,64,87,101,98,114,97,103,101,111,117,115,46,99,111,109]
var encryptedemail_id50='' //variable to contain encrypted email
for (var i=0; i&lt;emailriddlerarray.length; i++){
    encryptedemail_id50+=String.fromCharCode(emailriddlerarray[i])
}
</code></pre>
