Q. Which PHP function converts an array to JSON?
β
Correct Answer: (A)
json_encode()
Explanation: json_encode() converts PHP data to JSON.