error_log() output for print_r() appearing on page

The print_r function accept second parameter for return so it retrun the variable instead of printing it.

print_r($expression, $return)

So you can do

error_log( print_r( $variable, true ) );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)