i have one string called dvojka
value is 0110111101101010
It's a binary.
And I need to insert character "-" after each 8 chracter, because one character is 8 bits.
Is there some way using PHP?
Thank you.
wordwrap ?
$output = wordwrap($dvojka,8,'-',true);
The 3rd parameter is required as the string your breaking up doesn't have any whitespace
Example : http://codepad.org/sbhBe5pb
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