Php
$kat_sorgu=mysql_query("select kategori_adi from kategori order by id asc limit 10");
$bilgi=mysql_fetch_array($kat_sorgu);
for($x=0;$x<10;$x++){
echo $bilgi[$x]."<br>";
$haber_sorgu=mysql_query("select * from haberler where kategori='".$bilgi[$x]."' order by id asc limit 10");
$haber=mysql_fetch_array($bilgi);
for($y=0;$y<10;$y++){
echo $haber[$y]."<br>";
}
}
2013-02-09 12:39:02