PhpRiot
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

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