Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]ereg_replace
-gosiak-
post 26.03.2011, 12:28:50
Post #1





Goście







używam funkcji która między innymi usuwa spacje ale ereg_replace jest przestarzałą funkcją, czym ją zapstąpić
  1. function clean($data) {
  2. $data = ereg_replace ("(\t)+", "\t", $data);
  3. $data = ereg_replace ("\r\n", "", $data);
  4. return ereg_replace (" +", " ", $data);
  5. }
Go to the top of the page
+Quote Post

Posty w temacie
- gosiak   [PHP]ereg_replace   26.03.2011, 12:28:50
- - cykcykacz   Kod <?php $str = str_replace(...   26.03.2011, 12:33:02
- - wookieb   http://pl.php.net/preg_replace   26.03.2011, 12:33:06
- - gosiak   Ale chodzi mi o usuwanie niepotrzebnych spacji nie...   26.03.2011, 12:43:05


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 07:23