×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Pascual Muñoz
Added: Mar 8, 2017 9:48 AM
Views: 18
Tags: no tags
log function funcion log dump var_dump
  1.         public function log($data) {
  2.                 if (is_array($data)) {
  3.                         $output = "<script>console.log( 'Debug Objects: " . implode(',', $data) . "' );</script>";
  4.                 } else {
  5.                         $output = "<script>console.log( 'Debug Objects: " . $data . "' );</script>";
  6.                 }
  7.                 echo $output;
  8.         }