PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Updating Entries

After retrieving an entry, you can update that entry and save changes back to the server. Here's an example:

<?php
$client 
Zend_Gdata_ClientLogin::getHttpClient($user$pass$service);
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query(
        
'http://www.blogger.com/feeds/blogID/posts/default');
$query->setMaxResults(10);
$feed $gdata->getFeed($query);
foreach (
$feed as $entry) {
    
// update the title to append 'NEW'
    
echo 'Old Title: ' $entry->title->text;
    
$entry->title->text $entry->title->text ' NEW';

    
// update the entry on the server
    
$newEntry $entry->save();
    echo 
'New Title: ' $newEntry->title->text;
}

Zend Framework