Reputation: 516
I just want to properly translate this
foo.push(("000" + parseInt(foo1.charAt(loc3), 16).toString(2)).slice(-4));
into php.
Anyone can help me?
Upvotes: 1
Views: 77
Reputation: 163291
$foo[] = substr("000" . decbin(hexdec(substr($foo1, $loc3, 1))), -4);
Untested, but should either work or get you close.
Upvotes: 4