Hi,

Suppose you have a model class 'Person' which has a attribute
'birthdate' and a method 'get_age()'.
function get_age() {
    return (int)date('Y') - self.birthdate;
}

How can I call the get_age() method in my Person views?

Thanks in advance.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to