I am trying to create and understand recursion in php/mysql
my database looks something like the following
id | woid | parent | name
-------------------------------
1  | 1111 | 0      | pdf
2  | 1111 | 0      | docs
3  | 2222 | 0      | pdf
4  | 2222 | 0      | docs
5  | 3333 | 0      | pdf
6  | 1111 | 2      | folder1
7  | 2222 | 4      | folder3
8  | 3333 | 5      | folder
I would like to have it where if there are tons and tons of parent folders, it will be able to go through all of them. how do i go about doing this.
 
     
    