note 31957 added to function.array
| From: | php-general at lists dot php dot net | Date: | Sat, 10 May 2003 08:53:11 +0000 |
| Subject: | note 31957 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47811@lists.php.net to get a copy of this message | ||
Similarly to a comment by stlawson at sbcglobal dot net on this page:
http://www.php.net/basic-syntax.instruction-separation
It is usually advisable to define your arrays like this:
$array = array(
'foo',
'bar',
);
Note the comma after the last element - this is perfectly legal. Moreover,
it's best to add that last comma so that when you add new elements to the
array, you don't have to worry about adding a comma after what used to be
the last element.
$array = array(
'foo',
'bar',
'baz',
);
--
http://www.php.net/manual/en/function.array.php
http://master.php.net/manage/user-notes.php?action=edit+31957
http://master.php.net/manage/user-notes.php?action=delete+31957
http://master.php.net/manage/user-notes.php?action=reject+31957