Idfk
04-18-2012, 12:54 PM
I've got a news query while and i want the news article colors to be picked from
This is what i have:
$j[1] = "blue";
$j[2] = "yellow";
$j[3] = "purple";
$j[4] = "orange";
$j[5] = "green";
while( $array = mysql_fetch_assoc( $query ) ) {
echo "{$j}";
$j++;
if( $j == 6 ) { $j = 1; }
}
I want it to display them in that order aswell blue, yellow, purple, orange, green then back to blue.
Can anyone help? Thanks.
This is what i have:
$j[1] = "blue";
$j[2] = "yellow";
$j[3] = "purple";
$j[4] = "orange";
$j[5] = "green";
while( $array = mysql_fetch_assoc( $query ) ) {
echo "{$j}";
$j++;
if( $j == 6 ) { $j = 1; }
}
I want it to display them in that order aswell blue, yellow, purple, orange, green then back to blue.
Can anyone help? Thanks.