i want to change the color of li or tr whatever possible after one another.
Note:- I want to call this in while loop so static class will be no solution
I want the output lke:-
<li>line1</li> //white background
<li>line2</li> //red background
<li>line3</li> //white background
<li>line4</li> //red background
or if possible in like:-
<tr>
<td>line1</td> //white background
</tr>
<tr>
<td>line2</td> //red background
</tr>
<tr>
<td>line3</td> //white background
</tr>
<tr>
<td>line4</td> //red background
</tr>
What i am trying yet is:-
<?php
$fields = CFS()->get('gallery');
foreach ($fields as $field) { <?
<table>
<tr><td><?php echo $field['slide_title']; ?></td></tr>
<tr><td><?php echo $field['upload']; ?></td></tr>
</table>
<?php } ?>