PHP correct indentation?

Posted by brainle55 on Stack Overflow See other posts from Stack Overflow or by brainle55
Published on 2010-04-20T13:17:04Z Indexed on 2010/04/20 13:23 UTC
Read the original article Hit count: 652

Filed under:
|

I'm a beginner PHP coder, recently I've been told I indent my code not correctly. They say this is wrong:

    if($something) {
        do_something();
        }
    else {
        something_more();
        and_more();
        }

While this is right?

    if($something) {
        do_something();
    } else {
        something_more();
        and_more();
    }

Really? I am willing to become opensource coder in nearest future so that's why I'm asking how to write code in a good way.

© Stack Overflow or respective owner

Related posts about php

Related posts about indentation