Skip to content

Instantly share code, notes, and snippets.

@eyedol
Created June 25, 2012 13:31
Show Gist options
  • Save eyedol/2988593 to your computer and use it in GitHub Desktop.
Save eyedol/2988593 to your computer and use it in GitHub Desktop.
//switch this code
return ($this->response_type == 'json')
? $this->array_as_json($response)
: $this->array_as_xml($response, array());
//to
return ($this->response_type == 'xml')
? $this->array_as_xml($response, array());
: $this->array_as_json($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment