UNPKG

phpjs

Version:

php.js offers community built php functions in javascript

25 lines (19 loc) 654 B
<!-- Generated by Rakefile:build --> <strong> <a href="http://brett-zamir.me" rel="nofollow">Brett Zamir</a> </strong> on 2011-07-20 03:47:32 <br /> @Pier Paolo Ramon: Good catch! Thanks--fixed in Git... (This function as with many others still needs to support reliably ordered associative arrays--see PHPJS_Array() in array().) <hr /> <strong> <a href="www.mastersoup.com" rel="nofollow">Pier Paolo Ramon</a> </strong> on 2011-07-15 16:45:51 <br /> You should check if it's a property of the object, with hasOwnProperty. <pre><code> for (key in trans) { if (!trans.hasOwnProperty(key)) continue; tmp_ar[trans[key]] = key; } <pre><code> <hr />