Just like incrementing numbers, you an increment letters as well. (Run best using the CLI)
This function let's you grab file extension from an array of filenames
Example of how to use crypt() to store passwords securely in a database.
Updated from the "Zodiac Signs" function already posted here. The other function had some overlapping month/day areas that would determine some birthdate/sign combinations incorrectly. (ie: 10/27 as Libra instead of Scorpio.)
This basic snippet will create a random authentication code, or just a random string.
Quick preview of how to open, edit and save some sort of text file (HTML, PHP, CSS, JS, etc).
This will display the files size, instead of displaying the size in bytes, why not display GB, MB, KB or bytes as well.
Convert text URL's in a string to an HTML link.
I am currently working on my own content management system and decided I would release a little pre-installation checklist script that makes sure you have all the required functions enabled on your hosting environment and shows you what you currently have and what is required in the end. If you have all the requirements that the script requires, it shows a little button at the bottom to continue the installation, if not, an error. You can easily change the file you want to check writing to by editing $file It comes with some styling already and in a nice table. Enjoy and let me know how it is.
This function will take a birthday and calculate an age.
Turn a string into a readable url. Useful for blogs. Take a title of a post, say, "Best PHP scripts ever", this would create the string, "best-php-scripts-ever"
This is just a tutorial of how POST variables are used. Very helpful for those starting PHP.
This class will convert English nouns from singular to plural.
This function searches a large string, for a smaller string.
Take a valid string URL with get variables, so they can be accessed using php's P\predefined GET variables or just return an array
This class is designed to be the interface class with a database (e.g MySQL). This is currently setup to use SQL syntax however can be changed if needed in future for a different type of database technology. Using this class will save a lot of programming if a change was needed. Has 3 main types of user accounts on construction for database privileges (readWrite, readWriteCreate, readOnly). Functions include query, insert, update, delete, number etc (have a look at the code :) )
A wrapper to PDO to make writing PDO queries simpler and easier.
This script makes a list of content for each month and puts the current month first, and then lists the months coming up.
Is your site in maintenance? Let users know by directing them to a maintenance page without them disrupting your maintenance.