How to: Convert MySQL Hierarchical Data Flat List Result to Multi-Dimensional PHP Array
Recently, for a fun stuff, I came across a need of an infinite level of categories. I stumbled uponGijs Van Tulder‘s article of “Storing Hierarchical Data in a Database” at SitePoint. Based of Van Tulder article I’m experimenting on my localhost. Below is the contents of my ‘categories’ table:+—–+——-+——–+———-+——+——+ | id | title | parent | parentid | lft |…
Read More »