New Zenner
- Join Date:
- Oct 2009
- Posts:
- 93
- Plugin Contributions:
- 0
Store categories and sub categories name in Array
I have three level categories in my store.
Category-->SubCategory-->SubCategory....
I want to store the names of Categories and Sub Categories in Array.
I have extracted this code:
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);
$content = '';// Load CSS file if this sidebox is enabled
$content .= '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/categories_css.css" />'."\n";// Load containing UL and content
$content .= '<ul class="bullet-menu" id="siteMenu">';
// get the menu tree (see the modules/sideboxes/YOURTEMPLATE/categories_css.php), strip off containing UL
$content .= preg_replace('%^\s*<ul>(.+)</ul>\s*$%sim', '\1', $menulist);
The contents are stored in $content now please tell me how can I retrieve them in different arrays.