RE: [PHP] global/local var in a function

2002-01-10 Thread Martin Towell
change for(i=0;imailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 10:44 PM To: [EMAIL PROTECTED] Subject: [PHP] global/local var in a function Hi, I have a little problem with a function. It calls him self and the var i is lost! after the call! can anybody help me? (it's javascri

RE: [PHP] global/local var in a function

2002-01-10 Thread Niklas Lampén
This is because it creates a new "thread", atleast I think it so. Use global variables to prevent this from happening: i = 0; function change_check_all(tree_item) { a = document.all[tree_item + "_check"]; b = document.all[tree_item + "_count"]; // changed the line below for(i