Ingenio Home  | Blog Policies  | Help
Welcome to Community Sign in | Join | Help

August 2007 - Posts

Use Functions

Creating functions for re-use will not only make your code shorter, but it makes your code much more legible.Let's say we've got a string that we want to process to remove all non-numeric characters. We would start with something like this:<?php$InString
posted by The PHP Doctor | 0 Comments

Comment Your Code

For many programmers, this one is obvious. Commenting code is important for a number of reasons:It will remind you what all the code does - if you don't look at it every day, coming back to uncommented code is often a hassle.It will be a nice gift to
posted by The PHP Doctor | 0 Comments

Expect the Unexpected

This one isn't easy...it takes a lot of practice to master, but the basic principle is simple:When you write your code, write it to handle what it isn't designed to handle.Here's an example:Let's say you've got a form where you ask for a zipcode because
posted by The PHP Doctor | 0 Comments