[Solved] How can I convert this short PHP function into JavaScript? [closed]
php syntax is pretty similar to JS. Just take the variables and remove the $, and declare them with the var keyword. function esn_to_num(esn) { var tmp = []; if ((tmp = explode(‘-‘, $esn))) { if (sizeof(tmp) == 2 && my_isnum(tmp[0]) && my_isnum(tmp[1]) ) { esn = ((tmp[0] << 23) | tmp[1]); } else { … Read more