note 90134 added to function.implode
| From: | houston_roadrunner at yahoo dot com | Date: | Tue, 07 Apr 2009 18:50:24 +0000 |
| Subject: | note 90134 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152919@lists.php.net to get a copy of this message | ||
it should be noted that an array with one or no elements works fine. for example:
<?php
$a1 = array("1","2","3");
$a2 = array("a");
$a3 = array();
echo "a1 is: '".implode("','",$a1)."'<br>";
echo "a2 is: '".implode("','",$a2)."'<br>";
echo "a3 is: '".implode("','",$a3)."'<br>";
?>
will produce:
===========
a1 is: '1','2','3'
a2 is: 'a'
a3 is: ''
----
Server IP: 64.71.164.2
Probable Submitter: 97.65.238.3
----
Manual Page -- http://www.php.net/manual/en/function.implode.php
Edit -- https://master.php.net/note/edit/90134
Del: integrated -- https://master.php.net/note/delete/90134/integrated
Del: useless -- https://master.php.net/note/delete/90134/useless
Del: bad code -- https://master.php.net/note/delete/90134/bad+code
Del: spam -- https://master.php.net/note/delete/90134/spam
Del: non-english -- https://master.php.net/note/delete/90134/non-english
Del: in docs -- https://master.php.net/note/delete/90134/in+docs
Del: other reasons-- https://master.php.net/note/delete/90134
Reject -- https://master.php.net/note/reject/90134
Search -- https://master.php.net/manage/user-notes.php