Hey
I need a little help with foreach.
I have this database:
formation:
formation_ID: 1 – player_ID: 2 – position: Keeper
formation_ID: 2 – player_ID: 6 – position: Central defence
formation_ID: 3 – player_ID: 4 – position: Left defence
formation_ID: 4 – player_ID: 7 – position: right defence
formation_ID: 5 – player_ID: 3 – position: Central defence2
Get for example only Central defence echo/printed?
i tried this:
[CODE]<?php
include(‘config.php’);
$sql = “SELECT positions_ID, position FROM postions”;
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
echo $row[1].”<br>”;
}
?>
but it just prints the intire colum.