Here, you'll find chunks of PHP, MySQL, HTML, JavaScript, and Ajax code that we've put together while working through various projects. Hopefully they'll help you out in your coding adventures too. Displaying posts 1 through 10 of 66:

TSV File to PHP Array

PHP
This function lets you take a tab separated text file (or comma separated, pipe separated, etc.) and convert it into a PHP array with just one line of code. Huge time saver. » View Post

Import MySQL Queries from a File Too Big for phpMyAdmin

MySQL | PHP
This PHP script will process queries exported by phpMyAdmin (or any other source) from a file that exceeds your maximum file upload size. » View Post

Blank HTML5 Template

HTML
Here's a blank HTML5 document ready for you to copy and paste. Or customize it a bit. We'll add your title, style sheet, and load up jQuery if you'd like. Easy as pie. » View Post

Convert IPv6 Address to IP Number with PHP

PHP
Quick and easy function converts both IPv4 and IPv6 addresses to IP numbers. No PHP extensions required. » View Post

Use JavaScript to Determine Vistor's Version of Internet Explorer

JavaScript
This function lets you see if someone is using IE and, if so, which major version. It's helpful for blocking access to pages that are known to fail in older versions of the browser. » View Post

Display an Unsupported Browser Warning with CSS

CSS | HTML
This example shows how to display an unsupported browser message to users simply and easily. No JavaScript needed. » View Post

Do Smart Quotes Hurt SEO?

SEO
I used to think yes, but recent evidence suggests otherwise. » View Post

Get Timezone by Latitude and Longitude in PHP

cURL | Maps | PHP
This function lets you quickly go from lat. and long. coordinates to a time zone by connecting to the GeoNames web service. » View Post

Convert State and Country Abbreviations to Names Function

MySQL | PHP
This PHP function makes it super easy and quick to go from an abbreviation to a full state or country name. We include the MySQL data tables you need too. » View Post

Countries, States, Provinces, and Oceans MySQL Dump

Data Dumps | MySQL
A MySQL data dump of tables containing all countries, U.S. states, Canadian provinces, Mexican states, and oceans. » View Post