PHP

No. 786 / A quick note about formatting strings

I’m writ­ing this because I just saved 8 – 10 lines of code by using printf(). I know it’s pretty easy to rely on con­cate­na­tion to print strings, but lib­eral use of printf() and sprintf() can add clar­ity to your code and cut com­plex­ity. Take the fol­low­ing, for exam­ple: No big deal. Now,…
Read more →

No. 740 / Debugging Data in PHP

My buddy John C. Bland II men­tioned some debug­ging func­tions I wrote up a while back while we worked together on some code for Ele­vate (an amaz­ing com­pany, by the way). I’d first seen some­thing very sim­i­lar to his dump() func­tion at a pre­vi­ous job (although it was named debug() there), so I felt…
Read more →

No. 449 / Extending CodeIgniter’s Exceptions Class

CodeIgniter, my favorite open-source PHP frame­work, pro­vides func­tions (full-on, glob­ally avail­able func­tions) for deal­ing with errors. It’s not such a bad thing, because you don’t have to worry too much about vari­able scope or any other trou­ble­some pro­gram­ming con­cepts. The down­side of hav­ing such a sim­ple approach to error han­dling, at least…
Read more →

No. 251 / Rethinking My Plugin Stash

No offense to the devel­op­ers behind these plu­g­ins. Great work. In fact, if asked, I’d rec­om­mend all of these plu­g­ins… I’m just not going to be using them any­more because they don’t meet my cur­rent needs. I think I’m going to have to cre­ate one plu­gin to rule them all (well,…
Read more →

No. 64 / CodeIgniter and Oracle

I’ve been writ­ing a lot of code lately and, as a result, my cre­ativ­ity is being sucked up by prob­lem solv­ing. I hope to write some­thing more inter­est­ing the next time around. While try­ing to fig­ure out how to get CodeIgniter to talk to an Ora­cle data­base, I came across this great post which…
Read more →

No. 38 / Windows XP, Xampp, PHP, and Oracle 10g

I found this arti­cle while Googling around for a way to make Win­dows XP, Xampp, PHP and Ora­cle 10g work together. It cov­ers every­thing pretty well, but I just want to add a few notes to bring the arti­cle up to date. Your “php.ini” file will be found in your Xampp folder. If your…
Read more →