console log php array code example
Example 1: php echo and array to consle
echo "<script>console.log('" . json_encode($data) . "');</script>";
Example 2: php echo an array to console
echo "<script>console.log('" . json_encode($data) . "');</script>";