Archives for: "September 2013"

Create a PHP class from a database table

Simple script to get the columns from a database table and write out a PHP class. PHP<?php$table = preg_replace('/\W/','',$argv[1]);if (empty($table)) die ('Invalid table'.PHP_EOL); try {   &#16… more »

Open Source Software and House Paint

If you think about it, free or inexpensive open source software is like house paint. The product is readily available and doesn't cost a lot, but can be very valuable. A good open source software system such as a content management system, ecommerce sy… more »

PHP - Sorting Objects - Performance Considerations

PHP has some great functions for sorting arrays, however, they should be used with care. If you have an array of complex objects and plan to sort only on one value, you may see significant performance gains if you flatten the array into a single dimens… more »

Cleaning up files created by the web server

Many times when you are working with a web application on shared hosting, the server will create files. Depending on the server configuration, it is possible those files will be created by a user other than the account holder. If you are using shared h… more »