driving me crazy
| TwistedGA | 
					 | 
			
|---|---|
| 
					 Alright guys, having a little trouble getting a call to a configuration to work properly. 
						I am able to echo $cfg['defaultcolor']
//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] 
					 | 
			
| Elgan | 
					 | 
			
|---|---|
					
   1. //Added Function for User_Display Creation
   2. function Split_String($namesplit) {
G[color=#EF2929]global $cfg;[/color]
   3.     $STR_LEN = strlen($namesplit);
   4.     $newdisplay = "";
   5.     for ($i = 0; $i < $STR_LEN; $i++) {
   6.         $newdisplay .= "<span style=\"color:#".$cfg['defaultcolor']."\">" . $namesplit{$i} . "</span>";
   7.     }
   8.     return $newdisplay;
   9. }
  10. $displayname = "".$ruserdisplay."";
  11. //Added Function for User_Display Creation
red is what i added. EDIT: it dindt show up right. Could colours work in codes? bug not meant to? so, you need to add a global to call cfg. so glboal cfg; before its needed will work. make sense? php.net may explain better.  | 
			
| TwistedGA | 
					 | 
			
|---|---|
| 
					 EDIT// That fixed it. At some point, my editor saved the file do the desktop and under .inc format, never changed the highlighter or anything so I didnt even notice. Spotted it hanging out when I decided to take a break frm the stress... I made over 75 usernames trying different things to get it to work and it was all for nothing! LOL... Don't tell anyone, K?  
						![]() [color=#CC0000]Lazymod[/color] [color=#000000]Studios[/color] 
					Dieser Beitrag wurde von TwistedGA (am 8. April 2009, 10:13, vor 16 Jahre) bearbeitet  |