Thanks you very sir #diafol,
This line work fine
$stringOutput .= (strlen($k==4))? '<tr class='mycolor'>':'<tr>';
It changes the Background color of all rows where code lenght is 4
Is it possible to use following multiple IF ... ELSE in above format
if(strlen($k==1)){
echo "<tr bgcolor='#ADF382'>";
} elseif (strlen($k==2)){
echo "<tr bgcolor='#AEEE8'>";
} elseif (strlen($k==4)){
echo "<tr bgcolor='#BE2548'>"; // YOU used this condition in $stringOutput
} else {
echo "<tr bgcolor='#EF2548'>";
}
After applying above codes The World will look like this
Where every group of code as length will be with unique background color.
Thanks