Simple API in PHP to return data in JSON format