Re: Arrays: Comma at end?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse <rgmicky@xxxxxxxxx> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux