Petko Yotov writes: >> $retval .= 'c' . $output; > > For testing purposes, in order to see the array values rather than 'Array', > try > > return pre_r($retval); This was incorrect, sorry. You can use the pre_r() function on all $output variables above, not on $retval: $retval .= 'c' . pre_r($output); Petko