Over the years I’ve accumulated a few useful tidbits that I thought would be helpful. Since people regularly let me know they’ve found them helpful, I’m keeping them online. Please let me know if you find them helpful!
- PHP Function for a List of States for HTML Forms — This is a useful function for keeping code clean, you can just stick this function into an external file.
- MySQL List of States & PHP Function for Select Box — Similar to the above, but utilizes a MySQL table.
- MySQL Table of all Countries
- Mini-Framework Functions — Frameworks can be useful, but sometimes, for small projects, they’re really overkill, and can be hard on a server’s resources for little return with a simple site. They also take time to learn — and who’s got time to do that when the project is due tomorrow morning? The following are some simple framework-like mini functions that will help keep your code clean and consistent, and move things along a little faster.
- How to Deal with Apostrophes/Single Quotes in PHP when using preg_match