On 4/21/07, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>
>
> one of my favorite php functions these days is http://php.net/compact
>

Thanks for the suggestion. I'm not quite sure how compact will help me,
though. Lets consider this example:

$this->renderElement('element', array('arg1' => 'val1', 'arg2' => 'val2));

Inside 'element' we could do this:

$this->renderElement('element2', compact('arg1', 'arg2'));

which looks a little nicer than this:

$this->renderElement('element2', array($arg1, $arg2));

.. but not quite the solution I was looking for. What I'm trying to avoid is
having to specifically write each and every variable in either method. I was
hoping for a way to grab them all and send the arguments to the next
renderElement call. Maybe I understood how to use compact? I'd really
appreciate an example.

Thanks!

Regards,
Gonzalo.

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

Reply via email to