hi quoc,
{n} is a place holder for "index number". CakePHP will automatically
replace it with the appropriate index number. Consider if you have
data in this format and you want to extract all the tiles
// Data
$data = Array([0] =>
array("Post" =>
array('title' => "hello world")
),
[1] =>
array("Post" =>
array('title' => "My First Post")
)
)
//Using Set Class of CakePHP to extract title
Set::extract($data, "{n}.Post.title");
So, as you can see {n} is just a place holder for index number
(0,1,....)
Regards,
bingo
On Feb 13, 7:55 pm, quoc <[EMAIL PROTECTED]> wrote:
> In the cake manual this is an example of the generateList function:
>
> $this->set(
> 'Roles',
> $this->Role->generateList(null, 'role_name ASC', null,
> '{n}.Role.id', '{n}.Role.role_name')
> );
>
> I see this around a lot {n}.Role.id but I can't seem to figure out
> what the {n} means. I've been trying to search for it but I can't find
> anything on it.
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---