style switch in forech loop |
[eluser]René Tuin[/eluser]
Hi, I have a problem. I want to switch a style of a certain object. I have already done it with php only if I use the same code in CI i don't get any result. I've the following code in my view: Code: <?php Knows someone a solution to my problem. Greetz
[eluser]Dam1an[/eluser]
You could always use the alternator function in the string helper
[eluser]jalalski[/eluser]
If style is 'even', then you want to switch it to 'noeven' and vice-versa. Then it will work. HTH
[eluser]René Tuin[/eluser]
[quote author="Dam1an" date="1243428701"]You could always use the alternator function in the string helper[/quote] Thx Dam1an, That was the helper I was looking for, i didn't know that it was the string helper. Greetz
[eluser]Dam1an[/eluser]
Thats why there's a wonderful little search box I couldn't remember if it was string or text helper either lol
[eluser]xwero[/eluser]
Why need two classes if one is enough? You always have the normal style of the table row, table specific or not, and then you just add a class to the rows that need to have another style. Code: foreach($query as $i->$row) |
Welcome Guest, Not a member yet? Register Sign In |