Re: Arrays: Comma at end?
| From: | Micky Hulse | Date: | Tue, 07 Feb 2012 20:26:04 +0000 |
| Subject: | Re: Arrays: Comma at end? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316543@lists.php.net to get a copy of this message | ||
On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse <rgmicky@gmail.com> wrote:
> Yah, ditto! :D
$s = 'foo,bar,';
print_r(explode(',', $s));
The output is:
Array
(
[0] => foo
[1] => bar
[2] =>
)
That's one instance where I know you have to be cautious about the
trailing delimiter.
I know, this is all noob stuff... Sorry. :D