this is my code snippets and the result is not the thing that i want.I have 2 associative arrays and want to echo their contents into one table like before the html tag.how can i do that?
team A: team B:
player_one player_five
player_two player_six
player_three player_seven
player_four player_eight
<html>
<head>
<title>Untitled</title>
</head>
<body>
<table widht='100%' border="1">
<tr>
<td>team A</td>
<td>team B</td>
</tr>
<?php
$team_a=array("goalkeeper"=>"player_one","defender"=>"player_two","midfielder"=>"player_three","forward"=>"player_four");
$team_b=array("goalkeeper"=>"player_five","defender"=>"player_six","midfielder"=>"player_seven","forward"=>"player_eight");
foreach($team_a as $index1 => $value1 ){
foreach($team_b as $index2 => $value2 )
echo "
<tr>
<td>$value1</td>
<td>$value2</td>
</tr>
";
}
?>
</table>
</body>
</html>