Multi dimensional array sorting in php

Sorting a multi dimensional array represents a very common and frequent requirement. Let me get straight to a practical example:Here is an array of activities by several users on EduSagar:$activities = array ( '1' => array( 'id