Date: 11/15/00
- Next message: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Previous message: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Next in thread: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is base_convert() not working for you?
http://www.php.net/manual/function.base-convert.php
-adam
On Wed, 15 Nov 2000, Jon Tai wrote:
> function hex2bin($hex_str) {
> for ($i = 0; $i < strlen($hex_str); $i += 2) {
> $bin_str .= chr(hexdec(substr($hex_str, $i, 2)));
> }
> return $bin_str;
> }
>
> I've been using this homemade one in the past, but I agree that a hex2bin
> function should be built in.
-- / adam maccabee trachtenberg | visit college life online \ \ adam <email protected> | http://www.student.com /-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Previous message: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Next in thread: Jon Tai: "Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

