previousFunction Definitions (Previous) (Next) Commentsnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | Polish | Spanish | Turkish

Arrays

Assignments in arrays may be aligned. When splitting array definitions onto several lines, the last value may also have a trailing comma. This is valid PHP syntax and helps to keep code diffs minimal:

<?php

$some_array 
= array(
    
'foo'  => 'bar',
    
'spam' => 'ham',
);
?>
previousFunction Definitions (Previous) (Next) Commentsnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.