function gradient($text, $hexfrom, $hexto){
$text = iconv('utf-8','windows-1251',$text);
$steprgb['r'] = ($fromrgb['r'] - $torgb['r']) / ($colorsteps - 1);
$steprgb['g'] = ($fromrgb['g'] - $torgb['g']) / ($colorsteps - 1);
$steprgb['b'] = ($fromrgb['b'] - $torgb['b']) / ($colorsteps - 1);
for($i = 0; $i <= $colorsteps; $i++){
$rgb['r'] = floor($fromrgb['r'] - ($steprgb['r'] * $i)); $rgb['g'] = floor($fromrgb['g'] - ($steprgb['g'] * $i)); $rgb['b'] = floor($fromrgb['b'] - ($steprgb['b'] * $i));
$hexrgb['r'] = sprintf('%02x', ($rgb['r'])); $hexrgb['g'] = sprintf('%02x', ($rgb['g'])); $hexrgb['b'] = sprintf('%02x', ($rgb['b']));
$return .= '<font color="'.$color.'">'.$text[$i].'</font>';
}
return iconv('windows-1251','utf-8',$return);