Image

Imagesirstompsalot wrote in Imagephp

Hi guys,

I'm having a hell of a time making a parent/child tree system. It uses a wee bit of javascript to expand/collapse some tabular data, but I'm having trouble stepping through the tree to generate the row IDs.

Let me just say that what I am doing is considered tabular data. Here is what I am trying to generate. As you can see, the folders are indented, based on table cell class name.

Here's what I'm trying to generate:



The numbers are based on the parent folder's Id, plus a hyphen, then an incremental number. So in theory, what we would have is:



Now, the incrementing is fine, it's something like $table->tableid++;
But I can't figure out to decrease the Id at the appropriate time.

Anyone have any ideas or shots in the right direction?

Solution found, which was staring me in the face. A serious kudos goes to Imagerotring and the rest of you that helped. I love this community.

-Shade