Thanks... Works like a charm!

Had to change it to:
$combined = array();
                        foreach ($id as $key=>$value) {
                                $combined[$key] = array('id'=>$value ,
'percent'=>$percent[$key]); 
                                
                                }
  debug($combined);

Which makes;

Array
(
    [0] => Array
        (
            [id] => 3
            [percent] => 100
        )

    [1] => Array
        (
            [id] => 4
            [percent] => 100
        )
)
..... And so on for each

How would I then use this array for pagination?

$data = $this->paginate('Job', array('Job.id' =>  $combined ????));



-----Original Message-----
From: kdubya [mailto:kenwin...@winanstech.com] 
Sent: June-22-09 10:45 AM
To: CakePHP
Subject: Re: Array Help


Try something like this (assuming the two arrays you mentioned are called
$id and $percent respectively):

$combined = array();
foreach ($id as $key=>$value) {
  $combined[$key] = array('id'=>$value), 'percent'=>$percent[$key]); }


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

Reply via email to