Public paste
a.t.m.
By: Xmoo | Date: Mar 24 2009 13:25 | Format: PHP | Expires: never | Size: 529 B | Hits: 686

  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. echo "<h6>".$row['catlinks']."</h6>";
  8. echo "<li><img src='../".$row['lg']."' alt=''/'> <a href='".$row['link']."' target='_blank'>".$row['name']."</a></li>";
  9. echo "<br>";
  10. ?>