phranque - 5:35 am on Mar 15, 2011 (gmt 0)
welcome to WebmasterWorld, drgonzo!
you must declare your variables within the same scope in which they are referred.
for example if you did this:
$variable = 1;
then "$variable" would be declared within the scope of the "if" and the "$variable" in the assignment statement would be an undeclared variable.