if you take like a c programming class you will learn how to make code easilly readible.
but here is a little basic way of it. we'll just do a simple code that is meaningless.
<?
a();
for($i=1;$i<10;$i++){
//indent code inside a loop 2 spaces or a
//tab
}
function a(){
//same with a function
}
if($test){
//same with if
} else {
//same with else and some people have
//different ways of putting the else and
//curly bracket
}
?>
that is just a basic way of coding.