I got stuck with the nuance:
我被这种细微差别困住了:
//1 - get mysql results into array
while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
array_push($my_array, $row['fruit_name']);
}
//2 - sort array
sort($my_array);
//3 - convert array to json
json_encode($my_array);
/