I just discovered FirePHP today (via a discussion at PHPBuilder.com), a set of PHP classes along with a Firefox add-on which allows you to debug your PHP scripts through the Firebug console (a separate Firefox add-on you’ll also need to install if you haven’t already done so).
Essentially, what it does is allow your PHP server-side [...]
Debugging with FirePHP
MySQLi: Avoid Explicitly Listing Every Column in bind_result()
Upon being motivated by a “PHP style critique” discussion at the WebDeveloper.com forums, I dug around the manual page for mysqli_stmt::bind_result(), and noticed an interesting suggestion for the use of the call_user_func_array() function in combination with the bind_result() method (see the user note by “hamidhossain”).
The essence of the technique is to use call_user_func_array() to call [...]
NetBeans: Opening a Non-Project File
As I discussed earlier, I’ve been playing around some with NetBeans 6.5 for PHP IDE. While overall I have liked it a lot, one thing that was holding me back was that it did not seem to be possible to simply open a file for editing unless it was part of a defined project.
I figured [...]
Filtering MS Word Text
A common annoyance when dealing with user-supplied content is the way MS Word uses some non-standard character encodings (at least non-standard in terms of the web). Among others, these include the directional (a.k.a. “smart”) quotes. The problem occurs when you output text that contains those characters as a result of a user copying and pasting [...]
UTF8 in PHP and MySQL
The intent of this article is to tie together some things I’ve learned to do in order to get my web apps to “play nicely” with the UTF8 character set. Before we go any further, let me state that I do not claim to be an expert on this; the following is simply a collection [...]
Calculate Age: One-Liner Fun
Here’s a little one-liner I thought up today for this PHPBuilder forum thread. It’s purpose is to calculate someone’s age when you know the year, month, and day of their birth (integer values). In this snippet it is assumed that $year, $month, and $day hold the integer values for the birthday of interest.
$today = time();
for($yr [...]

Strip Comments and White-Space from PHP File
Inspired by a number of web forum “conversations,” I decided to make a little tool for stripping PHP comments from files as well as blank lines and leading white-space. This is for any of you who feel you need to save a few nano-seconds when processing PHP files, or maybe want to do a little [...]