Problem Statement
Which function is used to convert a PHP array into a JSON string?
Explanation
The json_encode function converts PHP data structures like arrays or objects into JSON strings, which can be sent over APIs or stored easily.
Code Solution
SolutionRead Only
json_encode($data);
