i have this piece of code that works fine
PHP Code:
$sql2= "SELECT country, GROUP_CONCAT(name ORDER BY country SEPARATOR '<br>') as name
FROM tanks_owned
where player = '$player'
GROUP BY country";
$result2=mysql_query($sql2);
while (list($country, $name) = mysql_fetch_row($result2)) {
echo "<div style='width:90px; padding:5px; float:left;'>
<h4><img src='./icon/country/$country.png'></h4>$name
</div>";
}
i want to change it so that an image is displaye rather than text
example
PHP Code:
$sql2= "SELECT country, GROUP_CONCAT(name ORDER BY country SEPARATOR '<br>') as name
FROM tanks_owned
where player = '$player'
GROUP BY country";
$result2=mysql_query($sql2);
while (list($country, $name) = mysql_fetch_row($result2)) {
echo "<div style='width:90px; padding:5px; float:left;'>
<h4><img src='./icon/country/$country.png'></h4><img src="./icon/tank/$country-$name.png"/>
</div>";
}
the image src in the above dosent work as the $name value is an array. is it possable to make it as i want?