I have a problem where I need the key of an array to be the same.
This is what the array looks like:
$param1 = array('COLUMN' => array('NAME' => 'Country'));
$param2 = array('COLUMN' => array('NAME' => 'Buying Influence'));
$parameters = array_merge($param1, $param2);
But since an array can’t have the same key (‘COLUMN’) this won’t work. I can’t seem to find a way to have multiple ‘COLUMN’ parameters.
This is my entire function:
$result = $this->client->RawRecipientDataExport(array('EXPORT_FORMAT' => 1, 'MOVE_TO_FTP' => TRUE, 'COLUMNS' => $parameters));
If I only have one Column the operation works perfect:
$result = $this->client->RawRecipientDataExport(array('EXPORT_FORMAT' => 1, 'MOVE_TO_FTP' => TRUE, 'COLUMNS' => array('COLUMN' => array('NAME' => 'Country'))));
I also tried to set my array like this but it doesn’t work:
$param = array(
array('COLUMN' => array('NAME' => 'Country')),
array('COLUMN' => array('NAME' => 'Buying Influence'))
);
This is how my request needs to look:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ses="SilverpopApi:EngageService.SessionHeader" xmlns:rep="SilverpopApi:EngageService.Reporting">
<soapenv:Header> <ses:sessionHeader>
<ses:sessionid>16FE7B75445E6C704707025B1B7BBEE5</ses:sessionid> </ses:sessionHeader>
</soapenv:Header> <soapenv:Body>
<rep:RawRecipientDataExport>
<rep:EVENT_DATE_START>06/01/2009 00:00:00</rep:EVENT_DATE_START> <rep:EVENT_DATE_END>06/29/2009 23:59:00</rep:EVENT_DATE_END> <rep:EXPORT_FORMAT>0</rep:EXPORT_FORMAT> <rep:EMAIL>admin@yourorg.com</rep:EMAIL>
<rep:MOVE_TO_FTP/>
<rep:ALL_EVENT_TYPES/>
<rep:EXCLUDE_DELETED/>
<rep:INCLUDE_INBOX_MONITORING/>
<rep:COLUMNS>
<rep:COLUMN>
<rep:NAME>CustomerID</rep:NAME>
</rep:COLUMN>
<rep:COLUMN>
<rep:NAME>Address</rep:NAME>
</rep:COLUMN> </rep:COLUMNS>
</rep:RawRecipientDataExport> </soapenv:Body>
</soapenv:Envelope>