|
$q="SELECT * FROM P_portali WHERE related_en LIKE '%.bhrhotels.com' GROUP BY related_en ORDER BY AKcountryCodeVal";
$r=mysql_query($q);
$num=mysql_num_rows($r);
$tmpRelated="related_en";
$i=0;
while ($a=mysql_fetch_array($r)){
$i++;
$a[AKcountryCodeVal]=strtoupper($a[AKcountryCodeVal]);
if($oldCountry!=$a[AKcountryCodeVal]){
if ($i>= $num/4){
echo ' | ';
$i=0;
}
echo " $a[AKcountryCodeVal] ";
$i++;$i++;
}
$oldCountry=$a[AKcountryCodeVal];
echo " ".ucwords(substr($a[$tmpRelated],0,strpos($a[$tmpRelated],'.')))." Hotels ";
}
?> |