To write debugging information to the browser console, add a helper function as follows;
function debug_to_console($data)
{
$output = $data;
if (is_array($output))
$output = implode(',', $output);
echo "<script>console.log('Debug Objects: " . $output . "' );</script>";
}
then simply do;
debug_to_console("something");
[source]
No comments:
Post a Comment
Note: only a member of this blog may post a comment.