I have a combobox and i want to get data from php server
Here is my Index.html code http://jsfiddle.net/UQcgA/
Here is my data.php file.
But when i click to combo then nothing show :(. How can i fix that thanks
<?php
// function to create json
function GetCategories() {
$categories = "{'rows':[";
$categories = "{'id':'1', 'name':'Category 1'},";
$categories .= "{'id':'2', 'name':'Category 2'},";
$categories .= "{'id':'3', 'name':'Category 3'}";
$categories .= "]}";
return $categories;
}
echo GetCategories(); // sent to client
?>