note 53391 added to function.implode
| From: | Kl�ba at osu1 dot php dot net | Date: | Tue, 31 May 2005 12:42:03 +0000 |
| Subject: | note 53391 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89666@lists.php.net to get a copy of this message | ||
in case of value $item==0 but is set is necessary use function isset()
function implode_assoc($inner_glue,$outer_glue,$array,$skip_empty=false){
$output=array();
foreach($array as $key=>$item)
if(!$skip_empty || isset($item)){$output[]=$key.$inner_glue.$item;}
return implode($outer_glue,$output);
}
----
Manual Page -- http://www.php.net/manual/en/function.implode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53391
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53391&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53391&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53391&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53391&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53391&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53391&report=yes
Search -- http://master.php.net/manage/user-notes.php