hey wenn ich das
in einer array schleife einbinde kommt folgender error
Fatal error: Cannot redeclare text_fading() in /var/www/web56/html/chat/color.php on line 2
an was liegt das ?
grüsse fanger
PHP-Code:
<?php
$text = $bla['nick'];
$colbegin = "#".$bla['nickcol'];
$colend= "#".$bla['textcol'];
function text_fading($text, $colbegin, $colend){
$colored = '';
for($i = 0; $i < $sl = strlen($text); $i++){
$red = strlen($red = dechex(ceil((hexdec($colend{1} . $colend{2}) - $rb = hexdec($colbegin{1} . $colbegin{2})) / $sl * $i + $rb))) == 1 ? '0' . $red : $red;
$green = strlen($green = dechex(ceil((hexdec($colend{3} . $colend{4}) - $gb = hexdec($colbegin{3} . $colbegin{4})) / $sl * $i + $gb))) == 1 ? '0' . $green : $green;
$blue = strlen($blue = dechex(ceil((hexdec($colend{5} . $colend{6}) - $bb = hexdec($colbegin{5} . $colbegin{6})) / $sl * $i + $bb))) == 1 ? '0' . $blue : $blue;
$colored .= '<span style="color: #' . $red . $green . $blue . '">' . $text{$i} . '</span>';
}
return $colored;
}
?>
Fatal error: Cannot redeclare text_fading() in /var/www/web56/html/chat/color.php on line 2
an was liegt das ?
grüsse fanger
Kommentar