Code Tidy - Pastebin

New     Fork     Embed     View raw     Report

Algoritma - php

Embed

You can embed this paste into a blog or website with this code:

<iframe class="codetidy" type="text/html" width="100%" src="http://codetidy.com/paste/embed/3004" frameborder="0"></iframe>

Add comment

Captcha
  1. <??
  2.  ?
  3. $tumKategoriler = "select * from kategoriler"; #Array olarak döndü?ünü dü?ünelim.?
  4.  ?
  5. $tumGaleriler = "select * from galeriler"; #Array olarak döndü?ünü dü?ünelim.?
  6.  ?
  7. $tumGalerilerSon = array();?
  8.  ?
  9. $indis = 0;?
  10.  ?
  11. foreach ($tumGaleriler as $herBirGaleri) {?
  12.     ?
  13.     $tumGalerilerSon[$indis] = $herBirGaleri;?
  14.     $tumGalerilerSon[$indis]['id'] = explode("," , $herBirGaleri['id']);?
  15.  ?
  16.     $indis++;?
  17.  ?
  18. }?
  19.  ?
  20. foreach($tumKategoriler as $herBirKategori){?
  21.  ?
  22.     echo $herBirKategori['isim']."<br />";?
  23.  ?
  24.     foreach ($tumGalerilerSon as $herBirGaleri) {?
  25.         ?
  26.         if(in_array($herBirKategori['id'], $herBirGaleri['id']))?
  27.             echo $herBirGaleri."<br />";?
  28.  ?
  29.     }?
  30.  ?
  31. }?
  32.  ?
  33. ?>?
© 2011 Code Tidy