...

View Full Version : String or Char -> Binary Representation



sliminem
08-20-2011, 11:42 AM
Hi guys,

Is there a function to convert a String to its binary representation. Also maybe convert a char to binary.

Thank you.

Nightfire
08-20-2011, 04:07 PM
for($i = 0; $i < strlen($str); $i++){
printf("%08s ", decbin(ord(substr ($str,$i, 1))));
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum