Public paste
Undefined
By: Guest | Date: Mar 24 2009 14:05 | Format: PHP | Expires: never | Size: 665 B | Hits: 1009

  1. <?php
  2. $CatResult = mysql_query('SELECT id, cat FROM grupo_cat_links');
  3. $cats = array();  
  4.  
  5. echo "<pre>";
  6. while ($CatRow = mysql_fetch_assoc($CatResult)) {  
  7. $row['items'] = array();  
  8. $cats = $CatRow['id'];  
  9.  
  10.  
  11.  
  12. echo "<h6>".$cats."</h6>";
  13.  
  14.         $result = mysql_query("SELECT id, lg, catlinks, name, link FROM grupo_links WHERE catlinks='$cats'");  
  15.         while ($row = mysql_fetch_assoc($result))
  16.         {     $catlinks = $row['catlinks'];
  17.  
  18.                 $lg = $row['lg'];
  19.                 $link = $row['link'];
  20.                 $name = $row['name'];
  21.  
  22.        
  23.         echo "<li><img src='../".$lg."' alt=''/> <a href='".$link."' target='_blank'>".$name."</a></li>";
  24.         echo "<br>";
  25.         }
  26.  
  27. }