Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [PHP & MySQL] Str_replace funktioniert nicht (https://www.gegen-bilderklau.net/thread.php?threadid=142277)


Geschrieben von bambi.bummler am 06.10.2008 um 20:46:

  Str_replace funktioniert nicht

Ich habe folgenden Code:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
		$text = str_replace ( ':D', '<img src="images/smilies/biggrin.gif">', $text ); 
		$text = str_replace ( '?(', '<img src="images/smilies/confused.gif">', $text );
		$text = str_replace ( '8)', '<img src="images/smilies/cool.gif">', $text );
		$text = str_replace ( 'o.o', '<img src="images/smilies/eek.gif">', $text );
		$text = str_replace (':*(', '<img src="images(smilies/crying.gif">', $text );
		$text = str_replace (':evil:', '<img src="images/smilies/evil.gif">', $text );
		$text = str_replace (':(', '<img src="images/smilies/frown.gif">', $text );
		$text = str_replace ('=)', '<img src="images/smilies/happy.gif">', $text );
		$text = str_replace (':mad:', '<img src="images/smilies/mad.gif">', $text );
		$text = str_replace (':]', '<img src="images/smilies/pleased.gif">', $text );
		$text = str_replace (':0', '<img src="images/smilies/redface.gif">', $text );
		$text = str_replace (':rolleyes', '<img src"images/smilies/rolleyes.gif">', $text);
		$text = str_replace (':)', '<img src"images/smilies/smile.gif">', $text );
		$text = str_replace (':P', '<img src"images/smilies/tongue.gif">', $text );
		$text = str_replace (';D', '<img  src="images/smilies/wink.gif">', $text );
		$text = str_replace ('[b]', '<b>', $text );
		$text = str_replace ('[/b]', '</b>', $text );
		$text = str_replace ('[i]', '<i>', $text );
		$text = str_replace ('[/i]', '</i>', $text );


Das <b> und <i> wird ordnungsgemäß ersetzt. Die Smilies werden jedoch nicht angezeigt.
Wäre sehr lieb, wenn mir jemand helfen könnte.



Geschrieben von bambi.bummler am 06.10.2008 um 21:15:

 

musste die " auch weglassen und in ' umändern, aber jetzt gehts. danke!


Forensoftware: Burning Board, entwickelt von WoltLab GmbH