nz_mitch Posted March 14, 2009 Share Posted March 14, 2009 Sorry - the subject is probably totally useless. If a mod can think of a better way of describing it that'll be more helpful to people in the future, please change it! Thanks to the awesome help I got in this thread here, I've got all the information I need ready to load back into a database using the API. The values I've got from the form (which are all loading correctly) are $email_out, $name and $ref. The code I'm using below, which works when the third part (, "ReferringAgent" => "$ref") isn't included is as follow: $result = $cm->subscriberAddWithCustomFields("$email_out","$name", "ReferringAgent" => "$ref"); if($result['Result']['Code'] == 0) echo 'Success'; else echo 'Error : ' . $result['Result']['Message']; With the third part included I get the following PHP error: Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/www/domain.com/web/api/index.php on line 141 I'm guessing I'm doing something stupid with quotation marks, but I can't figure it out.. Thanks so much in advance! EDIT: Doh! Apparently all I needed to do was make: "ReferringAgent" => "$ref" "ReferringAgent => $ref" Link to comment https://forums.phpfreaks.com/topic/149425-solved-help-with-t_doublearrow-in-a-dynamically-updated-function/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.