0
How do you fix undefined variable in Php
undefined variable or index
2 Answers
+ 2
you have to define(initialize) it before you use it. It's a common error. Just initialize the variable with 0 or empty string before you use it further.
+ 1
By giving the variable a value.
Undefined variable means it does not equal anything. It has a null value.
PS it would help if I could see the code.