When using TextMate to code PHP, you may be annoyed by the way TextMate handles hitting the Enter key while in a PHP comment block. I would like the lead * to be continued on the new line. There are two ways to get this to happen.
Read the rest of this entry »

PHP Screencasts, PDF books, and source code. Lessons will be cover PHP Development, and the CodeIgniter PHP Framework.
As of today, TheWebLessons.com is open. If you register during the beta phase, you will receive a 50% discount on all of the lessons that will ever be published.
Lesson Topics Will Include
- Object Oriented Programming in PHP5
- Setting Up A CodeIgniter Project
- Understanding MVC Architecture
- Using Your Own Libraries With CodeIgniter
- Working with Sessions
- Databases and CodeIgniter
- Working With Forms
- Sending Email
- Testing Your Code
- And more…
Sign up today to lock in your discount.
I have recently become quite fond of using jQuery as my javascript library in conjunction with my CodeIgniter PHP projects. In PHP, I often name my form fields in the format of…
model_name[attribute_name]
For Example...
contact[first_name]
contact[last_name]
etc.
I do this so that I can easily retrieve all the attributes for each model and then quickly store them to the database using CodeIgniter’s database helper functions. For example, taking advantage of the Active Record Insert Syntax, I might write PHP code like this…
$contact = $_POST['contact'];
$this->db->insert("contacts", $contact);
When I started to use jQuery to do some client side javascript validation on my forms it was not immediately obvious to me that I needed to escape the square brackets in the jQuery calls.
Due to javascript’s encoding, you need to use double slashes – not just a single slash – to escape the square brackets.
Ironically the Zend Framework is marketed with the phrase “Extreme Simplicity & Productivity”. I have developed a few sites with it now and I find it to be anything but simple and productive. It’s complicated, has a steep learning curve, and (in my opinion) needs a lot more work. I realize that I’m coming from a RoR background and that is a lot for a PHP framework to try to match. Nevertheless, I am quitting all Zend Framework development until more work can be done on the framework. Then, maybe I’ll reconsider.
I have found CodeIgniter and have now built 3 sites with it. It’s simple, easy to use, speeds up development, has great documentation and, best of all, has won me as a fan. My most recent CodeIgniter project is an educational/e-commerce site about Rebounding with the Cellerciser While developing the site and reading the site content, I was convinced of the many reasons to use a Cellerciser I’ve now been using a Cellerciser for about 3 months and I love this thing!
Read the rest of this entry »