multi dimensional array

hi i need to display this multi dimensional array in a table

$arr = array (
array (“a” => “apple”, “aeroplane” ),
array (“b” => “bat”,“ball”),
array (“c” => “cat”,“catch”),
array (“d” => “dog”,“doll”));

i neeed to display this array in the format(table) as given below

a apple aeroplane
b bat ball
c cat catch
d dog doll

and

a b c d
aero ball cat dog
apple bed catch doll

please help me
thanku

Hi there, try the following:

[php]
echo ‘

’;
foreach($arr as $letter)
{
echo ‘’;
foreach($letter as $key => $word)
{
if(!is_numeric($key)) echo ‘’;
echo ‘’;
}
echo ‘’;
}
echo ‘
’.$key.’’.$word.’
’;[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service