29 Jun 2002

Sending HTML/Plain Text Mail Simultaneously using PHP

Although I expect this article to cause a few ruffled feathers amongst the programming community (since most of them are against HTML email), there are times when the client will ask for it anyway, so you have to know how to do it. We had run into difficulty finding a

0
27 Jun 2002

Displaying file sizes in human readable format

This code prints out “b” for bytes, “m” for megs, etc depending on the file size.

0
27 Jun 2002

Truncate text to x number of words

This code will truncate given text to a certain length, adding “…” where it’s been truncated. For example: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque ac urna a erat pharetra placerat. Sed at tortor id lacus pellentesque malesuada. Suspendisse vitae dui vel velit tincidunt aliquet. Cras condimentum lobortis

0
27 Jun 2002

Google Style Page Numbering (with x per page and y page numbers displayed)

With just a few modifications, we can create a piece of code that will not only give you x results per page with page numbers, but it will also allow you to specify how many page numbers should appear on the page at any time, much like Google.  (For example,

2
27 Jun 2002

Page Numbering (with x results per page)

Although there are several examples of this type of code to be found online, I had never found one that easily did what I needed and was flexible enough that we only had to change a few things to use it again – so I wrote my own. It links

1
19 Jun 2002

Alternating Row Colors in PHP/mySQL

Using alternating row colors in a PHP database application is a nice way to give the user some visual differentiation between multiple rows of results – and the best part is that it’s so damn easy.  I’m going to assume that you’re using CSS for formatting, but if you are

0