Public paste
now
By: Xmoo | Date: Mar 24 2009 13:34 | Format: PHP | Expires: never | Size: 617 B | Hits: 497

  1. <?php
  2. $result = mysql_query('SELECT id, cat FROM grupo_cat_links');
  3. $cats = array();
  4. while ($row = mysql_fetch_assoc($result)) { $row['items'] = array(); $cats[$row['id']] = $row; }
  5. $result = mysql_query('SELECT id, lg, catlinks, name, link FROM grupo_links');
  6. while ($row = mysql_fetch_assoc($result)) { $cats[$row['id']]['items'][] = $row; }
  7. {       $catlinks = $result['catlinks'];
  8.         $lg = $result['lg'];
  9.         $link = $result['link'];
  10.         $name = $result['name'];
  11. echo "<h6>".$catlinks."</h6>";
  12. echo "<li><img src='../".$lg."' alt=''/> <a href='".$link."' target='_blank'>".$name."</a></li>";
  13. echo "<br>";
  14. }
  15. ?>