Форуми / Cotonti / Support / Problems with $cfg[]

driving me crazy

TwistedGA
#11194 08.04.2009 05:09
Alright guys, having a little trouble getting a call to a configuration to work properly.

I am able to echo
$cfg['defaultcolor']
into the page, but when I try to use it in the string I need to, it doesn't insert the value it echo's like I need it to. The code is below, any help at all would be greatly appreciated. It's really odd that it will echo to the page and but wont insert into the string.
//Added Function for User_Display Creation
function Split_String($namesplit) {
    $STR_LEN = strlen($namesplit);
    $newdisplay = "";
    for ($i = 0; $i < $STR_LEN; $i++) {
        $newdisplay .= "<span style=\"color:#".$cfg['defaultcolor']."\">" . $namesplit{$i} . "</span>";
    }
    return $newdisplay;
}
$displayname = "".$ruserdisplay."";
//Added Function for User_Display Creation
[color=#CC0000]Lazymod[/color] [color=#000000]Studios[/color]