Hi Guys,
In the following code everything works bar one.
I'm having trouble getting the "CatName" value to display once, at the moment it displays two times.
How can i get this value to show once, i've successfully made the $urls[0] value show once, just not the CatName.
Any ideas?
$query = "SELECT * FROM categories WHERE CatID = $id";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<TABLE BORDER=\"0\" WIDTH=\"480\" CELLSPACING=\"0\" CELLPADDING=\"0\" BGCOLOR=\"#000000\">";
echo "<TR>";
echo "<TD WIDTH=\"400\"> <IMG BORDER=\"0\" SRC=\"images/gob.gif\" width=\"32\" height=\"12\">";
if ( $row['url'] != "" ) {
$urls = explode(", ", $row[url]);
for ($i = 0; $i < count($urls); $i++) {
echo " <a href=$urls[0] target=\"_blank\"><FONT COLOR=\"#FFFF00\">{$row['CatName']}</FONT></A>";
}
echo "</TD>";
}