Hello,

> class ActivitiesController extends AppController {
>
>        var $name = 'Activities';
>
>        function index(){
>
>                $year = 2009;
>                $month = 12;
>                $day = 15;
>
>        }
>
>        function add(){
>
>        }
> }
>
>        how can I see variables $year, $month, $day in function "add",
>        and if I change their value (i.e. $day = 1) how can I in function
>        'Index' see that new value.
>
>        Can samebody help me with this sample of code!

Your should declare them just as $name. They belong to the
ActivitiesController class, not the function.

I suggest reading some tutorial on PHP OOP as well as visibility scope
in PHP. This is nothing CakePHP revelant.

Regards,
Piotr

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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