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.....


<table>
<tr>
<th>Team Name</th>
<th>HomeTown</th>
<th>Wins</th>
<th>Losses</th>
<th>Ties</th>
<th>Division</th>

</tr>

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

<tr>
<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>

print_r($teams)

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