A very simple rendered for PHP based templates. Not a template language, just a simple wrapper that handles undefined template variables, helper functions, and turning a phtml file into a string. If you're using some kind of framework, you probably shouldn't be using this. I threw this together to be pasted (yes, pasted, if you have composer up and running, pull in a real template library) into exsisting legacy projects and turn classic HTML with embedded PHP into a bit more up-to-date PHP rendered templates. Source: [url=https://github.com/tjlytle/Render]Github.com[/url]
Take a text file and display an image on certain days (such as a holiday logo).
checks the week day of my birthday depending on the year I specify
This function will calculate the distance between point A (latitude, longitude) and point B (latitude, longitude) returning a distance in miles.
Convert Fahrenheit to Celsius and vise versa.
If a class implements an interface from another package you might run into trouble if you do not include the interface in your package. This class allows you to reduce coupling by generating empty interfaces at runtime if necessary. The class will try to autoload the interface and if this is not possible it will generate it.
This is I think a cleaner way to handle generating a list of selection options. The only thing that needs to be done to add or remove a country is to modify the countries 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 :) )
This is an example of how to insert lots of data into a database using mysql_query only once!
Place line numbers next to some text, this uses CSS and PHP to display clean content with line numbers.
Creates a thumbnail image when a photo is uploaded to your site.
Code choose 6 numbers between 1 and 42 , sort them and choose a reserve number between 1 and 42 , then display it in the browser.
Do you display data from a database, but your table is one row? Fix that by using this code to make your data more than one row for readability.
This PHP script helps you execute SQL statements or .sql file with PHP. There is a good deal of tutorials for this but we are going to use mysqli and its built-in commands to quickly execute small or large number of SQL statements or .sql file with PHP. It's functionality is similar to "Import" option in Mysql database. Because it greatly simplifies the task of executing sql statements quickly and without any hassle. Since this is implemented in PHP core classes, you can use it in anywhere including any frameworks (you may need slight customization or need to find relevant statements in respective frameworks, but it always works).
Need to convert miles to feet, or feet to mile or even inches? Using this function you can convert one to the other.
This brilliant code snippet I have collected on Stackoverflow.com is really helpful.
Take a JPG image, and convert it to ASCII code! Checkout the NEW ASCII converter! Supports all GD Images!
Quick preview of how to open, edit and save some sort of text file (HTML, PHP, CSS, JS, etc).
it redirects to the specified url in 3 seconds