I am using the php API and having problems populating the custom fields in my list. I am calling subscriberAddWithCustomFields passing the email, name, and an array of the fields.
I turned on some debugging in the makeCall method and I see the fields have gotten passed to it and it makes the call successfully. Example:
makeCall: options: = Array ( [params] => Array ( [ListID] => __REMOVED__ [email]=> firstname.lastname@example.org [Name] => louis [CustomFields] => Array ( [SubscriberCustomField] => Array (  => Array ( [Key] => Address [Value] => asdfasdf )  => Array ( [Key] => City [Value] => )  => Array ( [Key] => State [Value] => ) ) ) ) )
The custom field keys DO match the Personalization Tag.
If I log into my account I can see that it has added a record for the subscription however the custom fields are empty.
Can you please help, I feel like I am following the examples correctly. Not sure what is going on.
Nevermind. I figured it out.
I had renamed your array2xml function (because our cms has one by the same name) and not renamed all the calls to this function so it had been using mine - which doesn't format exactly the same as yours.
I might offer up the advice to package this a little better to avoid conflicts when plugging into existing application. The functions array2xml and xml2array are pretty common names, it would be preferred if these were moved into your class.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free