here is the code, which is meant to output a string of about 50 characters made of — and , in random color for the dashes, with the dashes occurring only in pairs. I get a "0" for the final output.
function flow() {
$ar = array( 0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f);
$count = 0;
$output = "";
for($int = 0; $int < 50, $count < 50; $int++) {
$r1 = $ar[rand(0, 15)]; $r2 = $ar[rand(0, 15)];
$g1 = $ar[rand(0, 15)]; $g2 = $ar[rand(0, 15)];
$b1 = $ar[rand(0, 15)]; $b2 = $ar[rand(0, 15)];
$col = "\"$r1.$r2.$g1.$g2.$b1.$b2\"";
$output += "<span style=\"color:#";
$output += $col;
$output += ">——</span>";
$count = $count + 2;
if(count >= 50)
break;
$numSpaces = rand(0, 9);
for($j = 0 ; $j < $numSpaces, $count < 50; $j++) {
$output += " ";
$count++;
}
}
echo $output;
} // end flow