Convert MYSQL to JSON by PHP
I did not find any function to convert the result of a MySQL query directly into JSON notation, so I made my own function. The first parameter is the result of the query, without any parsing, just the output of mysql_query function, the second parameter is the name you want to give to your JSON [...]





