困惑如何处理数组返回

function get_galleryxml_row($table_data)
{
   $xml_output = array();

   if ($table_data)
   {
        foreach($table_data as $key => $row)
        {
             $xml_output[] .=   $this->exporter->get_property_gallery_data($key['id']);

        }

        return implode(" ",    $xml_output);
   }
}

get_property_gallery_data Returns area of images and urls which does contain data and I have checked but some reason i am getting the follow error.

Array to string conversion and it states this line as the error

$xml_output[] .=   $this->exporter->get_property_gallery_data($key['id']);

No need of . -

$xml_output[] =   $this->exporter->get_property_gallery_data($row['id']); // It should be only $key or $row['id']

It will store the value with new index. . is used to concatenate strings.

Try this...

 $xml_output[] .=   $this->exporter->get_property_gallery_data($key['id']);


to 

 $xml_output[] =   $this->exporter->get_property_gallery_data($row['id']);