Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created February 10, 2010 04:48
Show Gist options
  • Save pifantastic/300036 to your computer and use it in GitHub Desktop.
Save pifantastic/300036 to your computer and use it in GitHub Desktop.
<?php
for ($x = 0; $x < strlen($string); $x += 2)
{
print(hexdec($string[$x] . $string[$x + 1]) . " ");
$binary_string .= chr(hexdec($string[$x] . $string[$x + 1]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment