Dear All,
I am banging my head against the wall for almost 3 hours:
<?php
$query = "Select COUNTRY, FLAG from country_tbl where active = 'Y'";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$data[$i]['COUNTRY'] = $row['COUNTRY'];
$data[$i]['FLAG'] = $row['FLAG'];
$i++;
}
$anzahl_spalten = $i;
// Country
echo "<table class=\"text_White_small\" border=1 cellpadding=1
cellspacing=0>";
echo "<tr bgcolor=\"#FFFFFF\" ><td> </td>
for ($i=1;$i<$anzahl_spalten;$i++) {
echo "<td width='3%'>".$data[$i]['COUNTRY']."</td>;
}
echo "</tr>";
// Flag
echo "<table class=\"text_White_small\" border=1 cellpadding=1
cellspacing=0>";
echo "<tr bgcolor=\"#FFFFFF\" ><td> </td>
for ($i=1;$i<$anzahl_spalten;$i++) {
// This is the tricky part. I tried using the imageXXX functions but always
// getting error messages or other strange outputs
echo "<td width='3%'>".$data[$i]['FLAG']."</td>;
}
echo "</tr>";
?>
Is there anybody who can explain how to show these flags on a page?
I try to build a matrix where the user can select the countries but it looks much nicer with flags.