Public paste
Undefined
By: Guest | Date: Mar 24 2009 13:45 | Format: PHP | Expires: never | Size: 711 B | Hits: 521

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