Че за ошибка?
Notice: Undefined variable: return in /
usr/home/data/infosoc/erisses.ru/
kernel/func.php on line 24 Notice:
Uninitialized string offset: 29 in /usr/
home/data/infosoc/erisses.ru/kernel/
func.php on line 24
24 строка.
$return .= \'<font color=\"\'.$color.\'\">\'.$text[$i].\'</font>\';
Полная функция.
function gradient($text , $hexfrom , $hexto) {
$text = iconv(\'utf-8\' ,\'windows-1251\' , $text);
$colorsteps = strlen($text);
$fromrgb[\'r\'] = hexdec(substr($hexfrom , 0,2));
$fromrgb[\'g\'] = hexdec(substr($hexfrom , 2,2));
$fromrgb[\'b\'] = hexdec(substr($hexfrom , 4,2));
$torgb[\'r\'] = hexdec(substr($hexto , 0,2));
$torgb[\'g\'] = hexdec(substr($hexto , 2,2));
$torgb[\'b\'] = hexdec(substr($hexto , 4,2));
$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\']));
$color = implode(null, $hexrgb);
$return .= \'<font color=\"\'.$color.\'\">\'.$text[$i].\'</font>\';
}
return iconv(\'windows-1251\' ,\'utf-8\' ,$return);
}
$return не определена.
Да ну ее,я с Димона соцки хочу потянуть.