me explico tengo 5 enlaces:
jose www.tencnologia.com
miguel www.tencnologia.com
antonio www.teletimo.com
jose www.teletimo.com
se repiten muchos resultados.
Código PHP:
$sql = "SELECT DISTINCT nombre,url,destaca,act FROM dr_anuncio WHERE act='1' ORDER BY id ASC";
$res = mysql_query ($sql) or die (mysql_error());
if (mysql_num_rows($res) > 0){
// Si hay datos
while ($list = mysql_fetch_array($res)){
//web
if (!$list['url']=='') {
$web = " <a class='rosa' href='http://".$list['url']."' target='_blank'>".$list['nombre']."</a> ";
}
echo "$web";
}
}