note 27182 deleted from language.types.array by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 03 Jul 2004 13:25:24 +0000 |
| Subject: | note 27182 deleted from language.types.array by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72425@lists.php.net to get a copy of this message | ||
Note Submitter: t.kloppenburg@billiton.de
----
When you have to extend an array like those in example 7-4 or 7-10, you always have to double check
if there's a comma after every line but the last.
That's annoying.
Some day I discovered that it is possible to write a comma even after the last element, so you can
just copy&paste array element lines without the comma-trouble:
$a_fields = array(
"foo" => "bar",
"yellow" => "green",
"fish" => "banana", /* with comma! :) */
);
I really hope, the php parser doesn't think this is an syntax error in some future versions...