|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jaczes Smarty n00b
Joined: 12 Feb 2009 Posts: 2
|
Posted: Thu Feb 12, 2009 3:54 pm Post subject: kolorowanie niektórych rzędów |
|
|
Witam! mam problem - potrzebuję pokolorować parę konkretnych rzędów z wyników mysql'a (id,imie) gdzie np. imie == Jan
Code: | {foreach item=data from=$e}
<td>{$data}</td>
{/foreach |
|
|
Back to top |
|
fornve Smarty Rookie
Joined: 25 Apr 2008 Posts: 29 Location: Sheffield, UK
|
Posted: Tue Feb 17, 2009 9:41 am Post subject: |
|
|
Taki przyklad... gdzie $data jest oczywiscie tablica
Code: |
{foreach item=data from=$e}
<tr {if $data.imie=='Jan'}style="color: red;"{/if}>
<td>{$data.id}</td>
<td>{$data.imie}</td>
<td>{$data.nazwisko}</td>
<td>{$data.telefon}</td>
</tr>
{/foreach}
|
Pozdrawiam |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|