// Put each POI information into $response[“hotspots”] array. foreach ( $pois as $poi ) { // Use function Getactions() to return an array of actions associated with // the current POI. $poi[“actions”] = Getactions ( $poi, $db );