Thanx Sam, once again, for the help. Ok, I guess I wasn't clear
enough, BUT what I really want is to be able to display the records
(or arrays?) in this array. Right now I'm only able to show it through
the 'print_r': I'm getting an error msg indicating wrong INDEX for
array when I try to loop.
So, I hope you can now help me with how the code in VIEW should look
like. I now have
>>
foreach($agents as $agent):
echo agent['fname']['lname']
enforeach;
>>
agents" => array(
"John" => "Mensah",
"Sumani" => "Abdulai",
"Eric" => "Adotey",
"Sam" => "Darko",
"Moses" => "Adjei",
"Kwabena" => "Kyeremeh"*
),
The final result will be display in the 'view' page of 'Jurisdiction'
model
-sam
On Jun 9, 9:15 pm, Sam Sherlock <[email protected]> wrote:
> Hi Sam,
> I thought you wanted to extract data to make this array
>
> Array
> (
> [0] => Array
> (
> [0] => John
> [1] => Sumani
> [2] => Eric
> [3] => Sam
> [4] => Moses
> [5] => Kwabena
> )
>
> )
>
> as that was highlighted red.
>
> - S
>
> 2009/6/9 [email protected] <[email protected]>
>
>
>
> > Thanks, Sam.
>
> > But I'm pulling data from the 'Jurisdiction' model, not 'Agent' as in:
> > $this->Jurisdiction->Agent->find(......)
>
> > -sam
>
> > On Jun 9, 4:57 pm, Sam Sherlock <[email protected]> wrote:
> > > using this as the path with set::extract
>
> > > /agents/@*
> > > - S
>
> > > 2009/6/9 samuel darko <[email protected]>
>
> > > > Hi All:
> > > > I need help in extracting data from my find('list') result.
>
> > > > I have $this->Jurisdiction->Agent->find(......)
>
> > > > and getting the result below but want just a portion of it, highlighted
> > in
> > > > pink (I've tried using set::combine() to no avail)
>
> > > > $___viewFn =
> > "/home/ilcs/website_files/app/views/jurisdictions/view.ctp"
> > > > $___dataForView = array(
> > > > *"agents" => array(
>
> > > > "John" => "Mensah",
> > > > "Sumani" => "Abdulai",
>
> > > > "Eric" => "Adotey",
> > > > "Sam" => "Darko",
>
> > > > "Moses" => "Adjei",
> > > > "Kwabena" => "Kyeremeh"*
>
> > > > ),
> > > > "jurisdiction" => array(
> > > > "Jurisdiction" => array(),
> > > > "Owner" => array(),
> > > > "Agent" => array(),
> > > > "Transaction" => array(),
> > > > "Vendor" => array()
>
> > > > ),
> > > > "num_agents" => 3
> > > > )
>
> > > > .......
> > > > ..........
>
> > > > Thanks for any help.
> > > > Sam Darko
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---