Skip to content

Instantly share code, notes, and snippets.

View BrendanNeufeld's full-sized avatar

Brendan Neufeld BrendanNeufeld

  • github.com/rangle
View GitHub Profile
//source: http://www.paulund.co.uk/output-php-data-in-browser-console
<?php
/**
* Send debug code to the Javascript console
*/
function debug_to_console($data) {
if(is_array($data) || is_object($data))
{
echo("<script>console.log('PHP: ".json_encode($data)."');</script>");