Archive - Originally posted on "The Horse's Mouth" - 2006-01-08 03:03:01 - Graham Ellis
I wanted to do a few conversions between hectares and acres and - guess what - I didn't know the conversion values off the top of my head. Then I may have a few other area conversion to do too, and I could do with some more PHP examples. Guess what ... a program ... and one worth sharing too
If you want to convert square cms to square ins, acres to hectares, or square miles to square kms, please use my converter!. Please feel free to copy the code too and change it to different type of units if you like; a credit / link back to my site would be appreciated.
If you're into PHP, there are some great examples of explode and implode, or the uses of associative arrays, of here documents, and of the (rather odd) list function. If you're not into PHP, simply enjoy converting your land sizes!
P.S - did I ever tell you about our currency converter with rates that are always up to date? Unlike units of area which never change, in the case of monetary exchange rates we have to take a daily feed from the European Central Bank to ensure we're reflecting current rates.