I have a database with some data encoded in json format. I would like to output an HTML table but I ran into a snag when the particular piece of data in the json encoded data cell was an array. The word "Array" is output for the field in the HTML table along with "Notice: Array to string conversion in...".
My code uses a MySQL statement to retrieve data and the usual fetch array operators. The specific code used to render the json encoded data is:
$user_params = json_decode($row['params'], true);
and to create the output:
The first line above renders correctly since the data is encoded as a single text string, however, the second line gives me the "Array" and message since it is encoded as an array within the json data. How can I fix this?
Here is the contents of the 'params' database field: