Hi,
I have the following problem.
I've got 2 functions: One that is called by the other one, to count a certain number of rows in a DB. The variable syncount needs to accessible throught the whole .php file (i.e. in all the functions)
I delcared the variable as global. But it does not seem to work... the variables is always empty ouside its own function.
Has anybody got an idea on how to enlarge the scoop of this variable.
Here is a slim down of the functions, that I cause the probelm.
Thanks,
Patrick
function count()
{
global syncount;
syncount = 0;
while(...some cond)
{
syncount++;
}
}
function display()
{
if (...some con)
{
print("Totle # found: $syncount");
}
}