<?php echo ($patient['Patient']['gender'] ? 'Male' : 'Female'); ?>

If it is 1 it will echo male, if 0 it will echo Female

On Tuesday, March 13, 2012 9:56:25 PM UTC-7, alexkd wrote:
>
> Hai, 
> I am  new to cakePHP. I want to display in my form 'Male' or 'Female' 
> instead of '1' and '0'. 
> In my view-index 
> <td><?php echo $patient['Patient']['gender']; ?> 
>  </td> 
>
> Although i searche a lot. I ca't . 
>
> Please help me

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to