[thelist] php & xml, counting elements

Paul Bennett Paul.Bennett at mch.govt.nz
Mon Dec 14 12:55:25 CST 2009


Hi Jeremy,

It's likely that decrementing $i is messing with your loop count.

Try $top = $i -1 instead - that way you aren't actually altering the
value of $i when you set $top.

Paul 

www.mch.govt.nz  -  www.teara.govt.nz  -  www.nzhistory.net.nz  -  www.nzlive.com

The information contained in this email message does not necessarily reflect the views of the Ministry for Culture and Heritage and may contain information that is confidential or subject to legal privilege. If you are not the intended recipient and receive this email in error: please notify the Ministry for Culture and Heritage by return email or telephone (64 4 499 4229) and delete this email; you must not use, disclose, copy or distribute this message or the information in it.

PLEASE CONSIDER THE ENVIRONMENT BEFORE YOU PRINT THIS EMAIL





More information about the thelist mailing list