Wednesday, April 4, 2012

Global functions

In my patient form one blood group select box.
My view.ctp is as follows,
<?php
switch ($patient['Patient']['bloodgroup']) {
case '0':
echo 'Rh A+';
break;
case '1':
echo 'Rh A-';
break;
case '2':
echo 'Rh B+';
break;
case '3':
echo 'Rh B-';
break;
case '4':
echo 'Rh AB+';
break;
case '5':
echo 'Rh AB-';
break;
default:
break;
}
?>
Can I place a function globally to return bloodgroup when id is
passed? If so what can I do for it?
Thanks.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate