I have category table:
Category table:
cat_id cat_pid cat_name
1 0 Women's Fashion
2 1 Women Accessories
3 2 Wallets & Cardholders
4 3 Cases
I have parent level category id which is "Women's Fashion (cat_id = 1)" and leaf level category id which is "Cases (cat_id = 4)"
I want to find all categories between 4 and 1.
Array like this:
Array(
[0]=>2
[1]=>3
)