Re: PHP and CakePHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <dmagick@xxxxxxxxx>
To: "Pham Huu Le Quoc Phuc" <phucphlq@xxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, March 30, 2006 5:20 PM
Subject: Re:  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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux