Skip to content

Instantly share code, notes, and snippets.

@woombo
Created April 10, 2015 20:16
Show Gist options
  • Save woombo/e25c4f38b2dbc3e1057b to your computer and use it in GitHub Desktop.
Save woombo/e25c4f38b2dbc3e1057b to your computer and use it in GitHub Desktop.
Enforce array on an object
<?php
// Enforce all rows are converted to an array when needed.
$rows = json_decode(json_encode($endpoints), TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment