• Avoid cuddled else: (} else {)

  • Separate keywords with blanks

  • Don't seperate functions/variables with blanks

Instead of


if($foo)

{

myfunction ($bar)

} else {

$counter [$i]++;

}

use:


if ($foo) {

myfunction($bar);

}

else {

$counter[$i]++;

}