note 95114 deleted from function.next by danbrown
| From: | danbrown@php.net | Date: | Mon, 14 Dec 2009 23:09:42 +0000 |
| Subject: | note 95114 deleted from function.next by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163965@lists.php.net to get a copy of this message | ||
Note Submitter: Trikks
----
This will add a , behind every value except the last one!
<?php
foreach($input as $key => $value) {
$ret .= "$value";
if (next($input)==true) $ret .= ",";
}
?>