I have binary stored in string
$str = "100001111111110000101010100010000001";
that I get from converting numbers array
$arrAsc = Array
(
[0] => 33
[1] => 63
[2] => 48
[3] => 42
[4] => 34
[5] => 1
)
$arrBinary = array_map(create_function('$a', 'return decbin($a);'), $arrAsc);
after breaking the value out into 6-bit chunks I have
Array
(
[0] => 100001
[1] => 111111
[2] => 110000
[3] => 101010
[4] => 100010
[5] => 1
)
my question is how to show zeros first even if there 5,6,7.... bit chunks
Array
(
[0] => 100001
[1] => 111111
[2] => 110000
[3] => 101010
[4] => 100010
[5] => 000001
)