Thread: Curly brackets!
View Single Post
Old 05-06-2009, 01:15 PM   #9 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,216
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
You can try to do things short handed, so if you have a quick conditional, you don't have to use brackets like so:

if($a) {
echo "hello";
}

That's 2 brackets you have to worry about. But you can just do this:

if($a) echo "hello";
While it may seem like wisdom at the time to this, it is bad practice and can lead to bugs more easily.

Always indent your code, without indents code is half impossible to read. That should take care of half your problems right there.
Village Idiot is offline  
Reply With Quote