Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php return json data to ajax

header('Content-Type: application/json'); 

$colors = array("red","blue","green");
echo json_encode($colors);
 
PREVIOUS NEXT
Tagged: #php #return #json #data #ajax
ADD COMMENT
Topic
Name
2+3 =