I am trying to display the order in which certain steps can be performed. Some steps can be taken at the same time, while others must follow in a specific order. I have the data already in the SQL table, and I just want it to be able to be transferred to a PHP array or something so that I can print it.
Data is stored in table 1 sql with two fields. The first is stat (which is the number of this block), the second is prereq, which identifies the predecessor (which will be some other stat). If the prereq field is null, this is the starting point. The end point is when there are no other lines.
First example:
status_number prereq
------------- -------
3 NULL
4 3
5 4
6 4
7 5
7 6
8 7
Looks like this conceptually:
, PHP, , 2 ( 5 6). , : (3,4, (5,6), 7,8). ? !