jessica
answered Jul 18 '21 00:00
there are many way of debugging in php
first of all get all errors or warnings in the screen or specific error logs file
set error reporting set true in debug mode
error_reporting(1);
error_reporting(E_ALL) show all notices , warnings , and fatal errors
error_reporting(E_ALL);
to debug php array , use print_r
$a=array("a","b");
print_r($a);
print_r will print array with values
to debug variable with type , use var_dump
var_dump($a)
var_dump will print value and type