private function flatten(array $array, $courseId) { //we will pass this value by reference $flatArray = array(); $order = 0; $iris = new IrisClass(); $iris->recursive($courseId, $array, $flatArray); return $flatArray; }