<?php
function colored_text($str) {
	$cl = ["Royal Blue", "green", "red","brown","yellow"];
	$str_out = "";
	$ant_color = "";

	for($i=0; $i<=strlen($str)-1 ;$i++) {
		$color = $cl[rand(0, count($cl)-1)];
		while($color == $ant_color) {
			$color = $cl[rand(0, count($cl)-1)];
		}
		$ant_color = $color;
		$str_out = $str_out."<font color='".$color."'>".$str[$i]."</font>";
	}

	return "<strong>".$str_out."</strong>";
}
?>
