PHP Echo и Array to Consle

echo "<script>console.log('" . json_encode($data) . "');</script>";
Different Dormouse