Anonymous asked:
I have a php script. There is a variable which gets bigger and bigger until I get an error. This error happens when I do something like $variable = $variable.$othervariable. I would like to know the values of $variable and $othervariable exactly in the moment I get the error. Is there a way to do this?
I have a php script. There is a variable which gets bigger and bigger until I get an error. This error happens when I do something like $variable = $variable.$othervariable. I would like to know the values of $variable and $othervariable exactly in the moment I get the error. Is there a way to do this?


2 Comments to 'How do I get my own error message on php?'
February 17, 2010
You need to set an error handler like this:
February 18, 2010
The easiest way is to use :
echo “Var1 “,$variable,” Var2 “,$othervariable,”";
This will show the variable building down the page.
Leave a comment