PHP Return JSON Data to Ajax
header('Content-Type: application/json');
$colors = array("red","blue","green");
echo json_encode($colors);
Grepper
header('Content-Type: application/json');
$colors = array("red","blue","green");
echo json_encode($colors);
<?php
echo json_encode($data);
?>