Sounds like you want json_encode()
$countries = array ();
while($row = mysql_fetch_array($result)){
$countries[] = $row['Country'];
}
echo json_encode($countries);
pritaeas
Posting Prodigy
9,549 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,497
Skill Endorsements: 98
Question Answered as of 1 Year Ago by
pritaeas