Here is a version of the "implode"-function,
that will handle multi-dimensional arrays also:
<?php
$myArray = array (
"fruits" => array ("a"=>"orange", "b"=>"banana", "c"=>"apple"),
"numbers" => array (1, 2, 3, 4, 5, 6),
"holes" => array ("first", 5 => "second", "third")
);
function implode_m($array, $glue=' ')
{
$return = FALSE;
if (is_array($array))
{
while (list ($key, $val) = each ($array))
{
if (is_array($val))
{
$return .= $glue.$key;
$return .= implode_m($val, $glue);
}
else
{
$return .= $glue.$val;
}
}
}
return $return;
}
$string = implode_m($myArray);
echo $string;
?>