but could not find a solution.
so I have an Array that looks like this:
Array(
[0] => Array
(
[ID] => 1
[Vorname] => Fisrtname
[Nachname] => Lastname
[Geburtsdatum] => 1990-01-01
[Email] => [email protected]
[Telefon] => 0511123123
))
I want to convert it to JSON and use it as response with Slim.
The problem ist, that echo json_encode(); and return $response->withJson(); returns nothing.
As I said, I serached a lot and this this two ways was all I could find. Maybe you know why this didn't work.
json_last_error_msg()php.net/manual/en/function.json-last-error-msg.php$item = mb_convert_encoding($item, "UTF-8", "UTF-8")json_encode()does work when called with an array as argument.