Hi there! Got the following prob, and I can't figure out what's going wrong. The $AllDates variable is an array of unix-timestamps. Because the forum totally messes up the code, I've uploaded it here : http://home.hetnet.nl/~babipanghang/code.txt
The problem is that, instead of outputting :
===========================================
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
Like I expected (statement 3 gives false), it gives the following output :
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
((int)WorkingTime[\"year\"] == (int)LastSavedYear) = TRUE. - Stap2.
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
((int)WorkingTime[\"mon\"] < (int)LastSavedMonth) = TRUE. - Stap1.
In reality, that $AllDates array is way bigger, but can't put that in my posting here 😉. In short : it looks like the for-statement I've got is executing once for every if-statement IN the loop, from the last one to the first one.
What's wrong? Please help...
PS : I'm using PHP 4.05...