The following is a list of scripts that I have written to help solve medium to complex programming issues using PHP. Since this list is just getting started, I will continue to add to it over the coming weeks.
* All files are available in the 7-Zip (.7z) format. 7-Zip is an open-source archiving and compression format and tool for archiving in multiple formats including zip, Gzip, and more. It is VERY fast, secure, and enables encryption & password protection. You can get it here: http://www.7-zip.org/
** Note: These scripts are not bulletproof! They are not guaranteed to be perfect, or even accurate. They will not solve world hunger, or create peace in the Middle East. They may just be able to help you accomplish a task with a slightly less severe migraine.
Enjoy!
- Date Diff – The following function will take two dates, and return an array of the years, months, and days between the dates. It uses strtotime, so any date formats accepted by that function will work. NOTE that days difference between leap and non-leap years is not working yet. What needs to be done is to subtract the number of leap years from the days total. I have not had time to implement this yet…once I do I will re-post that version. Download here
- Flexible Table Display – The following script uses PDO and HTML_Table_Matrix to populate a table with variable query results. The basic idea is that whatever SELECT query you submit, the correct rows and columns will be displayed with the results. Column headers are included that are based on the column names in the table. Download here