How do you format arrays within parameters?

Posted by joslinm on Programmers See other posts from Programmers or by joslinm
Published on 2010-11-30T16:10:05Z Indexed on 2012/06/19 15:24 UTC
Read the original article Hit count: 227

Filed under:

I'm talking about something like this:

echo $form->input('general_addresss', array(
            'label' => 'Where will you go today?'
            'format' => array('before', 'input', 'after', 'label', 'after', 'error')
            ));

Do you start with one array parameter, then break a line? If it can't fit on a line, do you immediately break a line?

After of which, do you do a set number of tabs over? What happens if an array within an array has lots of properties?

Is there any particular guide you follow?

© Programmers or respective owner

Related posts about code-formatting