Hi there,
Is there any function in PHP to convert a string into the binary equivalent ? (ex: "toto" -> 00101011110101...)
Thx
function text2bin($string) { for($i=0; $i<strlen($string); $i++) { if( ($c = ord($string{$i})) != 0) $binstring .= decbin($c); } return $binstring; }
Thanks a lot mahers ! 😃
But what about bin2text ? :rolleyes: