Maybe postConditions(...) is what You are looking for. It's a
controller's method, and You can use it like this:
$data = $this->postConditios($this->data)
On Dec 20, 4:55 pm, mithnik <[EMAIL PROTECTED]> wrote:
> In case someone needs this here is the solution:
> no cake used:
> /*
> * Usage $data (array to be transformed), $result = null- to hold the
> result
> * transform($data, $result);
> */
> function transform($input, &$output, $key_path = array()) {
> foreach ($input as $key => $value) {
> if(is_array($value)) {
> $key_path[] = $key;
> transform($input[$key], &$output, $key_path);
> array_pop($key_path);
> } else {
> $path = implode(".", $key_path);
> $output[$path.".".$key] = $value;
> }
> }
>
> }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---