简体   繁体   中英

Three level dynamic list

I worked like two hours on this script, and finally I see almost the complete code, but I have some issues with it.

Here is whole code (PHP) http://robertr.pastebin.com/S4XcmC1f I wrote comments there, so you could easily understand, whats happening there.

And here is the source, which I got (HTML) http://robertr.pastebin.com/EMWQnGvt

As you can see at source, line 16 closes 15th opened div, and the same happens between line 48 and 47.

I just don't get it, how I could say to my code, to NOT print that last month closing div again, because this is already new year, and it shouldn't go there any more.

Please, help me. I'm exhausted.

Line 77 should be an elseif.

change

if($month != NULL) echo "\t</div><!-- END $month -->\n";

to

elseif($month != NULL) echo "\t</div><!-- END $month -->\n";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM