Display nested categories PHP Class

 

Creating categories and its sub categories is always prevalent when we are developing simple to huge applications. Basically we  will have the requirement of creating one- leveled subcategory of parent category but when we come across creating multi-leveled subcategories , then it  seems little vague, complex to meet the requirement. Here I have made a simple php class to create multi-leveled nested categories on select box, List and creating ‘BreadCrumb’ when navigated to those categories. Prime essence of this PHP class is use of recursive function ( calling parent function again and again ).

Continue reading “Display nested categories PHP Class”

PHP extract() Function

Definition and Usage

The extract() function imports variables into the local symbol table from an array.

This function uses array keys as variable names and values as variable values. For each element it will create a variable in the current symbol table.

This function returns the number of variables extracted on success.

Continue reading “PHP extract() Function”