It doesn't show any thing while $info['Employee']['dob'] isn't empty. This is my code <?php $stt = 0; foreach($data as $info): $stt++; ?> <tr class="<?php echo ($stt%2 == 0) ? "td1" : "td2" ?>"> <td class="order"><?php echo $stt; ?></td> <td> <a href="?url=employees/edit/<?=$info['Employee']['id']?>"><?=$info['Employee'] ['firstname'] . " " . $info['Employee']['lastname']?></a> </td> <td align="center"> <?=(!empty($info['Employee']['dob'])) ? $datetime->time2str($info['Employee']['dob']) : ""?> </td> <td align="center"> <?php echo $html->link("Xóa", "?url=employees/del/" . $info['Employee']['id']) ?> </td> </tr> <?php endforeach; ?>
----- Original Message ----- From: "chris smith" <[EMAIL PROTECTED]> To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]> Cc: <php-general@lists.php.net> Sent: Thursday, March 30, 2006 5:20 PM Subject: Re: [PHP] PHP and CakePHP > > The folowing code do not execute: > > <td align="center"> > > <?=(!empty($info['Employee']['dob'])) ? > > $datetime->time2str($info['Employee']['dob']) : ""?> > > </td> > > What do you mean? It doesn't show anything? Then > $info['Employee']['dob'] is empty. > > If not, explain what you see or what happens. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php