$this->set('data', array()) will make $data available in your view.
That means, you can write something like echo $data; in your view
file.

On the other hands, $this->data contains submitted data from your
form.

On Jul 1, 3:22 am, bingo <[EMAIL PROTECTED]> wrote:
> hi,
>
> Can someone can tell me the difference between using $this->set('data', 
> array()) and $this->data in controller.
>
> I am especially getting confused about this in relation to form. In
> general to send data to view, we have to set the variable using $this-
>
> >set(data, array). But to set the form, we need to use $this->data
>
> bingo.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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