PHP: Number base conversion in PHP.

| 2 Comments
I thought I might "publicise" some of the code buried within this site.  There are some useful things in here (even if I do say so myself ;)). And it would be a shame not to 'blog' from the rooftops.  Some of the code isn't much use in the real world, but it serves its purpose of teaching both programming methods and how to do funky things in PHP.

For first up, is arbitrary number base conversion in PHP.  I know PHP has a built in base_convert() function, plus several other specific base conversion functions, e.g. decbin(), but I wanted to a) show how to do it, and b) implement one which could do bases 2-62 (default PHP ones does 2-36).

http://www.pgregg.com/projects/php/base_conversion/base_conversion.php
Bookmark and Share

2 Comments

snip...non-english...crap... www dot 168hh dot com
Spam from: 221.200.140.125

Edited to remove the possibility of any referer link ever happening


spammer of 168hh dot com

Totally banned IPs: 221.200.0.0-221.203.255.255
inetnum:      221.200.0.0 - 221.203.255.255
netname:      CNCGROUP-LN
descr:        CNCGROUP Liaoning Province Network
descr:        China Network Communications Group Corporation
descr:        No.156,Fu-Xing-Men-Nei Street,
descr:        Beijing 100031
country:      CN

Far too much spam shit coming from there...  Good riddance.

Leave a comment

About this Entry

This page contains a single entry by Paul Gregg published on May 30, 2005 9:54 PM.

BirdArt - When birds get artistic was the previous entry in this blog.

That 2.5% "transaction fee" in stores and supermarkets. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.