I am using the Slim framework with PHP to create a RESTful API for my app. However, I assumed that the framework would have some way of creating easier JSON outputs rather than
why not $response->write(json_encode($dataAry)); instead of echo json_encode($dataAry); ?
$response->write(json_encode($dataAry));
echo json_encode($dataAry);