note 87897 deleted from function.implode by thiago
| From: | thiago@php.net | Date: | Mon, 29 Dec 2008 19:49:11 +0000 |
| Subject: | note 87897 deleted from function.implode by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148650@lists.php.net to get a copy of this message | ||
Note Submitter: thomas at tgohome dot com
----
re crazytonyi:
A quicker and slightly more efficient way would be to do this:
<?php
echo "'" . implode("','", $items) . "'";
?>
However that works only if you have more than zero items, otherwise you get a string of
"''" which might not be desired.