Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]usnięcie enterów z kodu html
Forum PHP.pl > Forum > Przedszkole
pablo_83
witam, mam problem z usunięciem nowych lini i tabulatorów z kodu html
to kod html:
  1. <h2>
  2. <span id="aktualnosci">Grant Fundacji Templetona dla Centrum Kopernika Badań Interdyscyplinarnych</span>
  3. </h2>


  1. trim($tresc, '\n');
  2. str_replace('\r\n\t', '', $tresc);


nie działa mi ani trim ani str_replace cały czas dosataje kod w takiej samej postaci h2 enter tekst enter h2 enter
WebKing
  1. $string = str_replace("\r\n", '', $string);
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.