My preferred style is
function function_name()
{
if($statement)
{
$code_goes_here=1;
$code_line_2=1;
}
}
So curly braces on new lines, tab indents. Not fussed one way or the other about spaces in the lines. I just want blocks of code to line up inside their respective curly braces.
When I start a function or code block its fine, I press enter, open the curly braces and press enter again, the braces are lined up where they should be and the cursor is in the right place for the code. Except as soon as I put in the ; to end the line, the whole line gets pushed back to be in line with the curly braces.
eg.
if($statement)
{
$code_goes_here=1;
}
I move it back where it belongs and press enter, cursor is in the place I want it but again when I put in the ; the indent for that line gets removed