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.
(written 2006-01-08, updated 2008-06-11)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
H107 - String Handling in PHP [31] Here documents - (2004-08-28)
[54] PHP and natural sorting - (2004-09-19)
[337] the array returned by preg_match_all - (2005-06-06)
[422] PHP Magic Quotes - (2005-08-22)
[463] Splitting the difference - (2005-10-13)
[493] Running a Perl script within a PHP page - (2005-11-12)
[560] The fencepost problem - (2006-01-10)
[574] PHP - dividing a string up into pieces - (2006-01-23)
[589] Robust PHP user inputs - (2006-02-03)
[608] Don't expose your regular expressions - (2006-02-15)
[642] How similar are two words - (2006-03-11)
[716] Evaluating arithmetic expressions in configuration files - (2006-05-10)
[728] Looking ahead and behind in a Regular Expression - (2006-05-22)
[1008] Date conversion - PHP - (2006-12-26)
[1058] PHP Regular expression to extrtact link and text - (2007-01-31)
[1195] Regular Express Primer - (2007-05-20)
[1336] Ignore case in Regular Expression - (2007-09-08)
[1372] A taster PHP expression ... - (2007-09-30)
[1533] Short and sweet and sticky - PHP form input - (2008-02-06)
[1603] Do not SHOUT and do not whisper - (2008-04-06)
[1613] Regular expression for 6 digits OR 25 digits - (2008-04-16)
[1799] Regular Expressions in PHP - (2008-09-16)
[2046] Finding variations on a surname - (2009-02-17)
[2165] Making Regular Expressions easy to read and maintain - (2009-05-10)
[2238] Handling nasty characters - Perl, PHP, Python, Tcl, Lua - (2009-06-14)
[2629] Curly braces within double quoted strings in PHP - (2010-02-09)
[3020] Handling (expanding) tabs in PHP - (2010-10-29)
[3424] Divide 10000 by 17. Do you get 588.235294117647, 588.24 or 588? - Ruby and PHP - (2011-09-08)
[3515] PHP - moving from ereg to preg for regular expressions - (2011-11-11)
[3516] Regular Expression modifiers in PHP - summary table - (2011-11-12)
[3534] Learning to program in PHP - Regular Expression and Associative Array examples - (2011-12-01)
[3788] Getting more than a yes / no answer from a regular expression pattern match - (2012-06-30)
[3789] More than just matching with a regular expression in PHP - (2012-06-30)
[3790] Solution looking for a problem? Lookahead and Lookbehind - (2012-06-30)
[4071] Setting up strings in PHP - (2013-04-27)
[4072] Splitting the difference with PHP - (2013-04-27)
G600 - Well House Consultants - Well House Manor [525] Vision AND venture - (2005-12-12)
[550] 2006 - Making business a pleasure - (2006-01-01)
[555] Hotel novelties - (2006-01-05)
[571] Well House Manor - (2006-01-21)
[575] Eating for the single business traveller - (2006-01-24)
[582] DWIM and AWWO - (2006-01-30)
[594] Twice is a co-incidence and three times is a pattern - (2006-02-07)
[598] Should we cruise around the world? - (2006-02-09)
[615] Looking for leading not bleeding edge - (2006-02-21)
[617] Easy, Free, Reliable internet access - (2006-02-22)
[643] If it's Sunday, it must be Bedwyn - (2006-03-12)
[667] Well House Manor goes ahead - (2006-04-03)
[884] Drive time - (2006-10-02)
[891] Well House Manor Hotel, Melksham, Wiltshire - (2006-10-10)
[902] Brand new hotel and training centre, Melksham - (2006-10-22)
[933] Course Joining package - updated - (2006-11-20)
[963] George Hotel and Well House Manor, Melksham - (2006-12-04)
[1059] Three sets of twins - (2007-01-31)
[1072] Well House Manor in the Snow - (2007-02-09)
[1211] A lot has happened in a year - (2007-05-31)
[1332] Melksham Hotel - Five Star Kitchen! - (2007-09-04)
[1388] Well House Manor - a year on - (2007-10-12)
[1520] Terms and Conditions - Hotel, England - plain English - (2008-01-26)
[1706] The Story of Well House Manor - (2008-07-12)
[2565] Bright day, snowy day - (2010-01-06)
[2962] Well House Manor - the history of the hotel - (2010-09-20)
[3405] Where do businessmen stay in Melksham? - (2011-08-25)
[3549] Well House Manor - perhaps the best hotel rooms in Melksham - (2011-12-10)
[3702] Digital Champions think that Well House Manor is a champion venue! - (2012-04-20)
[3800] Fancy a weekend away? Try Well House Manor in Melksham, Wiltshire - (2012-07-09)
[3814] Returning guests - a sign of a good product. Cream teas and hotel rooms. - (2012-07-22)
[3970] Comparing four VERY different places to stay - (2013-01-11)
[4101] POETS day at Well House Manor - (2013-05-24)
[4715] Well House Manor - Still five out of five! - (2016-10-30)
Some other Articles
Smoke and mirrorsPython's Generator functions''I don't know'' is sometimes a good answerConverting between acres and hectaresA new signColour doesn't have to mean colourfulWhat backup is adequate?Keep that image small