note 106199 deleted from function.implode by tularis
| From: | tularis@php.net | Date: | Tue, 18 Oct 2011 20:21:55 +0000 |
| Subject: | note 106199 deleted from function.implode by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183980@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster at antonfunk dot de
----
Dont know if usefull...
<?php
function implode_r( $glue, $array )
{
$returnstring = array();
if ( is_array( $array ) ) {
foreach ( $array as $value ) {
if ( ! is_array( $value ) ) {
$returnstring[] = $value;
} else {
$returnstring[] = implode_r( $glue, $value );
}
}
}
$returnstring = implode($glue, $returnstring);
return $returnstring;
}
$test =
array("a","b",array("c","d"),"e",array(array("f","g),"h));
print_r (implode_r(",",$test));
//will return "a,b,c,d,e,f,g,h"
?>