Useful PHP Functions
I've found the following functions useful. Some of them are functions I wrote from scratch, others are functions I found online and thought would be helpful. In some cases, I've re-written a publicly available function with friendlier variable names and added comments so that newer programmers can understand them more easily.
- PHP Function for a Select Box 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. Be sure to also check out MySQL Help section of my site if you are creating a database-driven site—I provide a MySQL state table. - Mini-Framework Functions
Sometimes using a framework is just overkill! A framework can be hard on a server's resources and most sites don't use all the features of any given framework. They also take time to learn—and who's got time to do that when the project is due tomorrow morning? 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 get a file's extension from the filename
- How to test if a browser is mobile with PHP
