Hello if someone can help me, i need help on this:
[php]
$number = 0;
while($linha_actividades_lista=mysql_fetch_object($resultados_actividades_lista)){
$number++;
if($number==‘1’ || $number % 4 == 0){$risco="‘bg_border_green_left’ style=‘width:240px; float:left; padding-top:10px; padding-bottom:10px;’";
}
else
{
$risco="‘bg_border_green_right’ style=‘width:240px; float:left; padding:10px 0 10px 15px;’";
}
if ($number % 3 == 0){$ultimo =“s”;}else{$ultimo=“n”;}
[/php]
Im trying to identify always the 1st record from the row where i have 3 records. in the example above i was identifying the 1st and multiples of 4, but thats not what i need, i was only doing some experiments.
But what i need is something like this, based on this code i have:
$number=1, $number=2, $number=3, $number=4, $number=5, $number=6, $number=7…
I need to apply different properties in the css for the first record in the row, and a different style for the others. This code i built might work , but im not getting the way to identify the first elements.
I Appreciate your help…
Thanks a lot