How do I convert a string to a binary array in PHP?
I think you are asking for the equivalent to the Perl pack/unpack functions. If that is the case, I suggest you look at the PHP pack/unpack functions:
If you're trying to access a specific part of a string you can treat it like an array as-is.
$foo = 'bar';
echo $foo[0];
output: b
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With