Can you post your code here so we can take a look?

Sounds like a simple case of loading the variable with a number before it goes through the main code.
Might be worth you taking a quick look in the PHP manual at the LET statement.

Hope that helps.

Leigh