phpbar.de logo

Mailinglisten-Archive

[php] Array / ereg_replace

[php] Array / ereg_replace

Daniel Zwink daniel_(at)_zwink.de
Sun, 04 Jun 2000 19:23:52 +0200


Hallo Markus,

> 3. Wie genau benutze ich str_replace() evtl. entfernen von
> Zeilenumbrüchen

<?
  $text = str_replace(chr(10),"",$text); // ob der nötig ist ?
  $text = str_replace(chr(13),"",$text);
  $text = str_replace("\n","",$text);
?>

So müsste das gehen.

Frei nach dem Manual:

http://www.php-center.de/de-html-manual/function.str-replace.html

Description
string str_replace (string needle, string str, string haystack)

str_replace --  Replace all occurrences of needle in haystack with str. 

Auf Deutsch ;-) :
Ersetzt alle Vorkommen von 'needle' im String 'str' mit 'haystack' !!!


Grüße

Daniel
-- 
 _
|_|      |\
    ___  | |
   |___| | |
 _       | |
|_|      |/



php::bar PHP Wiki   -   Listenarchive