André Hänsel said the following on 15/01/2006 23:57:
Hi!
Is there a better way to do this?
Well, you haven't said what "this" is - what are you trying to do?
$command = '$array = array_merge($array[\'' .
implode('\'],$array[\'',array_keys($array)) . '\']);';
eval($command);
From your code, I'm guessing that you want to convert an array of
arrays into a single array. How about
:
$result = array();
foreach ($array as $a)
{
$result = array_merge($result, $a);
}
--
Oli