<?php
//this calass includes functions related to categorys 
class category{    
	private static $categoryBedcrumbArray = array();
	// get category bedcreumb
	static function getcategoryBedcrumb($parent_id){
		global $db,$conn;
		$getSubcategory = $db->query("Select * FROM category WHERE entity_id =$parent_id LIMIT 1");
		if ($db->num_rows($getSubcategory) > 0){
			$rowSubcategorys = $db->next_record($getSubcategory);			
			self::$categoryBedcrumbArray[$rowSubcategorys['entity_id']] = $rowSubcategorys['name'];			
			self::getcategoryBedcrumb($rowSubcategorys['parent_id']);			
		}
		return self::$categoryBedcrumbArray;
	}
	
	
}
?>