Written by Andy on January 28, 2010 | No Comments |PHP Tutorials
This is a quick snippet of code I created to dynamically pull a user-defined query from a MySQL database and export it the a CSV file.
Written by Andy on January 8, 2010 | No Comments |PHP Tutorials
Here’s a quick snippet of code that allows you to quickly generate a random string of letters and/or numbers based on the variables you feed into the function.
Written by Andy on September 30, 2009 | No Comments |PHP Tutorials
This problem came up while working with the Allegheny County Property database. They have a field for the sale date of the property, only they’re storing the date like this – 3291982 for 03/29/1982.
Written by Andy on August 7, 2009 | No Comments |PHP Tutorials
Take an array of numbers, strip out the dollar sign and format them correctly.
This is useful when you are given prices as varchar or text with the dollar sign already included in the field. We’re going to start with an array of numbers, in this case we’ll use the array(‘$1256.45′,’$5564.75′,’$7895.33’).