Hi guys:
            i need help trimming down this:

Array
(
  [0] => Array
    (
      [0] => Array
       (
         [Amount] => 72.64
       )
     )
)


TO this:

 Array
     (
      [Amount] => 72.64
     )

I tried the ff code but to no avail:

function afterFind($results, $primary=false) {
                if($primary == true) {
                   if(Set::check($results, '0.0')) {
                      $fieldName = key($results[0][0]);
                       foreach($results as $key=>$value) {
                          $results[$key][$this->alias][$fieldName] =
$value[0][$fieldName];
                          unset($results[$key][0]);
                    }
                    }
        }       
            return $results;
        }


Thanks, in advance, for your help


-sam

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to