This script will open an image ($image), resize it to the values you specify ($max_height and $max_width), then if you want, add a border ($addborder). It uses
ImageCopyResampled from GD 2 as ImageCopyResized looks too pixelated. Set $image_quality to anything between 0 and 100.
Runs through an array, assigns variables based on key name. Ability to append or prepend text to newly created variables. Useful for adapting current applications that depend on
register_globals to work without it.
This is a class I wrote as a re-write of my original create_order_block() function. It's used to create href links on a page to sort a SQL query (in both ascending and decending
orders, the two will alternate).