View Single Post
Old 10-07-2009, 12:20 AM   #12 (permalink)
adamdecaf
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

Quote:
Originally Posted by benton View Post
Please show how to do it. What sort of problems?
Multiple problems.
  1. You may get a PHP error for syntax.
  2. Shorter code is not always better code.
  3. A lack of complete understanding will be evident and more prominent with shortened bits of code.
  4. Most developers will like to have that extra line or two.

I would suggest something similar to what ETbyrne wrote above, it solves the solution and provides it in a function for reusable purposes.
__________________
My Site
adamdecaf is offline  
Reply With Quote