I have following array:
$firstlevel=array(“numbers”,”vowels”,”animals”,”birds”);
$numbers=array(“one”,”two”,”three”);
$vowels= array (“a”,”e”,”i”,,”o”,”u”);
$animals=array(“lion”,”tiger”,”dog”,”wolf”,”horse”,”Zebra”);
$birds=array(“parrot”,”sparrow”,”crow”);
I need tree menu like below:(ONLY BY USING PHP)
+ numbers
+ vowels
+ animals
+ birds
Reset button
When clicking it expands like following:
+ Fruits
- Vegetables
+ Drumstick
+ Lady’s finger
+ Animals
+ Birds
The same format should be retain once we click on the other first level item its corresponding child nodes to be in expanded.
First of all, you need to create a table like this:
Download this plug-in and here is my php code for creating expand and collapse menu:
some styling: