All pastes #970048 Raw Edit

Someone

public text v1 · immutable
·published 2008-04-03 20:30 UTC
rendered paste body
// The disk isn't in the database, add it now.
$diskEntry = array('Disk' => array(
  'cdid' => $diskIndex['cdid'], 
  'title' => $diskIndex['title'], 
  'description' => $diskIndex['description']
));
$this->Disk->save($diskEntry);

foreach($diskIndex['items'] as $item)
{ // Loop each item
   /*
    * There are two items to enter into the database. This does not enter both, just the second.
    */
   $diskItemEntry = array('DiskItem' => array(
      'cdid' => $diskIndex['cdid'],
      'title' => $item['title'],
      'type' => $item['type'],
      'description' => $item['description']
   ));
   $this->DiskItem->save($diskItemEntry);
   /*
    * Yet this seems to echo out both items titles just fine: 
    */
   echo $item['title']; 
}