Here is the code:  Here id's and other things are correct.

// Get the AdGroupAdService.
  $adGroupAdService = $user>GetAdGroupAdService();

  $adGroupId = (float) $engineAdGroupId;
  $adId = (float) $engineAdvertisementId;
 
  
  // Create text ad.
  $textAd = new TextAd();
  $textAd->id = $adId;
  $textAd->headline = $title;
  $textAd->description1 = $desc1;
  $textAd->description2 = $desc2;
  $textAd->displayUrl = $displayURL;
  $textAd->url = $destinationURL;
  
 
  $adGroupAd = new AdGroupAd();
  $adGroupAd->adGroupId = $adGroupId;
  $adGroupAd->ad = $textAd;
  $adGroupAd->status = $status;

  // Create operations.
  $operation = new AdGroupAdOperation();
  $operation->operand = $adGroupAd;
  $operation->operator = 'SET';

  $operations = array($operation);

  // Update ad.
  $result = $adGroupAdService->mutate($operations);

  // Display ads.
  if (isset($result->value)) {
    foreach ($result->value as $adGroupAd) {
        return $adGroupAd;
    }
  } else {
    print "No ads were updated.";
  }

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to