简体   繁体   English

三级动态列表

[英]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. 这是完整的代码(PHP) http://robertr.pastebin.com/S4XcmC1f我在此处编写了注释,因此您可以轻松了解那里发生了什么。

And here is the source, which I got (HTML) http://robertr.pastebin.com/EMWQnGvt 这是我获得的源代码(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. 如您在源代码中看到的,第16行关闭了第15个打开的div,第48行和第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. 我只是不明白,我该如何对我的代码说,不要再打印上个月关闭的div,因为这已经是新的一年了,现在不应该再去了。

Please, help me. 请帮我。 I'm exhausted. 我精疲力尽了。

Line 77 should be an elseif. 第77行应为elseif。

change 更改

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

to

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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