//index.thtml
<?php
$name = "John";
$favorite = array('fruit'=>'orange' ,'color'='yellow',
'food'='spaghetti')
$options = array(
'update' => 'view',
'url' => '/demos/hello/',
'complete' => "Effect.Appear('view')"
);
echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>
<div id="view"></div>
//demos_controller.php
function hello()
{
<?php
$this->set('favorite',$favorite);
$this->set('name',$name);
?>
}
//hello.thtml
echo $name .":" . $favorite['fruits'] ."," . $favorite['color'] ."," .
$favorite['food'];
Hello. As you can see, to get hello.thtml rendered we need to feed
$name and $favorite to /demos/thtml. How can I do this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---