07-01-2009, 04:25 PM
|
#20 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Better indenting would have made this problem clear in an instant (there or there abouts)! Rather than having most things all mushed together along one vertical axis, follow a strict indenting system to make your code blocks much clearer.
Compare:
PHP Code:
function moo($lady = FALSE) { // This function moos! if ($lady) { steal_some_milk(); return ladylike_moo(); } return big_manly_moo(); }
To:
PHP Code:
function moo($lady = FALSE) { // This function moos! if ($lady) { steal_some_milk(); return ladylike_moo(); } return big_manly_moo(); }
Multiply that by 10 or 100 for a file full of code (wow, lots of moos!).
|
|
|
|