I am getting the Undefined index error message but I dont know why. I need to know whats going on and why this is happening...I am trying to display records stored in MySQL....Here is a sample of my code.....

<th>Team Name</th>


<?php foreach($teams as $team): ?>

<td><?php echo $teams['0']['Team Name']; ?></td>
<td><?php echo $teams['1']['HomeTown']; ?></td>
<td><?php echo $teams['2']['Wins']; ?></td>
<td><?php echo $teams['3']['Losses']; ?></td>
<td><?php echo $teams['4']['Ties']; ?></td>
<td><?php echo $teams['5']['Division']; ?></td>


What is going on here? Any feedback would be much appreciated!