Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rotassator/2572ffcb73c431aafd210e1f7b1a84a9 to your computer and use it in GitHub Desktop.
Save rotassator/2572ffcb73c431aafd210e1f7b1a84a9 to your computer and use it in GitHub Desktop.
PHP: get properties from an array of objects
<?php
array_map(function($o) { return $o->Name; }, $arrayOfObjects);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment