PHP -Echo und Array zum Konsum
echo "<script>console.log('" . json_encode($data) . "');</script>";
Different Dormouse
echo "<script>console.log('" . json_encode($data) . "');</script>";