I'm trying to find out how I would put a PHP error into a variable to display.
Similar to the mysql_error(); I'd like to be able to have displayed the error that PHP gives?
I'm using json_encode to send the testing user back a value from the requested PHP page but if an error happens I can get the mysql_error(); fine but how would I get the php error?
I've tryed $phpError = error_reporting(); but I just get error 22527 like this same Error. I just want to put the php error into a string to send back to the user.