Public paste
Step2
By: Xmoo | Date: Mar 24 2009 12:59 | Format: PHP | Expires: never | Size: 355 B | Hits: 528

  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. ?>