How to custom sort php objects (elegantly)?
<p>I have a list of ids [1,500,7] and a list of entities with corresponding id properties, but in a different order (1 -> 7, 500). In php, how can I sort them according to the list of ids?</p>

<p>Php version is 5.3.2</p>
