PHP Tutorials

  • By
    PHP Splat Function

    One of my favorite MooTools functions is $splat(). Splat takes a given argument and returns an array if the argument is not already an array. This is especially helpful when I've coded my script to cycle through an array of items for processing one at...

  • By
    Flatten Nested Arrays Using PHP

    While browsing the MooTools 1.2 source code, I found Array's flatten() method. The flatten() method takes nested arrays and "flattens" them all into one array. I asked myself how I could do that using PHP. The following is what I came up...

  • By
    PHP / MooTools 1.2 Accordion Helper

    The MooTools Accordion plugin seems to be the plugin that people seem to have the most problems with. It's an awesome plugin, so I can see why so many people want to use it, but I think that may be part of the problem.

  • By
    Backup Your MySQL Database Using PHP

    One of the most important tasks any developer needs to do often is back up their MySQL database. In many cases, the database is what drives most of the site. While most web hosts do a daily backup of a customer's database, relying on...

  • By
    PHP, Microsoft SQL Server (MSSQL), and IIS:  Connect and Query with ODBC

    I was recently thrown a real curveball of a project. Instead of using a fresh MySQL database to pull information from, the customer required that we pull information from their new Microsoft SQL Server 2005 server. This isn't the most desired method of PHP->Database...

  • By
    Get Your FeedBurner Reader Statistic Using PHP cURL and the FeedBurner API

    My favorite part of the Web 2.0 revolution is the abundance of APIs. Everyone has one: Digg, Feedburner, Pownce, Flickr, Google Maps, etc. FeedBurner provides a sweet "Awareness API" that allows you to pull statistics from your FeedBurner account. Here's how you...

  • By
    You Know How I Know You Read My Email?

    I've probably mentioned this before, but I've designed and coded numerous HTML email templates for my customers. Though I currently use an email service that tracks click-throughs, bounces, and opens, it wasn't always that way. I had to rely on my own methods of...

  • By
    Increase PHP Script Execution Time Limit Using ini_set()

    Every once in a while I need to process a HUGE file. Though PHP probably isn't the most efficient way of processing the file, I'll usually use PHP because it makes coding the processing script much faster. To prevent the script from timing out...

  • By
    Increase PHP’s File Upload Limit Using php.ini

    The file upload size limit is usually set pretty low by shared hosting providers. Why? To save bandwidth, keep the server moving quickly, and think about it -- how many customers really need a large upload limit? If you do need to increase...

  • By
    PHP Form Submission: Recognize Image Input Buttons

    As you probably know, you can recognize a form submission from a "submit" input type by placing the following code in the "processing" PHP script: Did you know, however, that when using an "image" input type to submit the form, the above wont work? You need...