i want to use an array walk to list out several items, but i can only get two at a time.
what i would like is to have an array (or arrays) that contain three things, and then be able to use the arraywalk command to output all three so i can use them in the same line. example:
$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
function test_print ($item2, $key)
{
echo "$key. $item2<br>\n";
}
array_walk ($fruits, 'test_print');
reset ($fruits);
returns
d. lemon
a. orange
b. bananna
c. apple
what i would like is
d. lemon grape
a. orange cherry
b. bananna strawberry
c. apple tangerine
any suggestions?