$array = mysql_fetch_assoc($result) or die(mysql_errno());
echo json_encode(str_replace('\'', '"', $array));
function SendData(id) {
res = $.ajax({
url : 'test.php',
data : 'postVar=' + id,
type : "POST",
dataType : "json",
success : function (data) {
res = "Pattern fo ID: " + data.female + " " + data.name;
}
});
return res;
}