On Wed, Sep 16, 2009 at 10:51 AM, Ernesto <[email protected]> wrote:
>
> i have a model that's using a simple 3-columns table
>
> item_id
> code
> description
>
> i want to obtain a select box that shows the fields "code" and
> "description" concatenated.
>
> right now i'm using a foreach loop
>
> foreach ($items as $key => $item) $selectArray[$key] = $item["code"] .
> " - " . $item["description"];
>
> is there any way to do this directly in the "find" call?

In the find call no, there isn't.  But take a look at
Set::format.

http://book.cakephp.org/view/672/format

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
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