Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] odwrotność nl2br
ADeM
post 28.11.2004, 13:35:29
Post #1





Grupa: Zarejestrowani
Postów: 455
Pomógł: 69
Dołączył: 23.10.2004
Skąd: Oświęcim

Ostrzeżenie: (0%)
-----


Jak zamienic br na nowa linie? tak zeby w textarea byly nowe linie a nie "<br />" Oto kod:
  1. <?php 
  2. include(&#092;"gora1.php\"); 
  3. $oo=file(&#092;"data.txt\"); 
  4. $id=$_GET['id']; 
  5. $lina=explode(&#092;"|\", $oo[$id]); 
  6. echo &#092;" 
  7. <TABLE border=&#092;"0\" WIDTH=\"465\" height=\"30\" ALIGN=\"center\" VALIGN=\"top\" CELLSPACING=\"0\" CELLPADDING=\"1\"> 
  8. <TD background=&#092;"tytul.gif\" WIDTH=\"465\" height=\"30\" ALIGN=\"center\" VALIGN=\"top\"> 
  9. <div align=&#092;"left\"> <font color=\"white\"><b>&nbsp;&nbsp;Edytuj !</td></tr> 
  10. <TABLE BORDER=&#092;"0\" WIDTH=\"465\" ALIGN=\"center\" CELLSPACING=\"0\" CELLPADDING=\"1\"> 
  11. <TD bgcolor=&#092;"black\" WIDTH=\"465\" ALIGN=\"center\" VALIGN=\"top\"> 
  12. <div align=&#092;"center\"><font color=\"#FFFFFF\"> 
  13. <p style=&#092;"margin: 10px\"> 
  14. <form method=&#092;"POST\" action=\"case.php?arty=edytuj&id=$id&user=$user&pass=$pass\"> 
  15. <strong>Temat</strong>:<br> 
  16. <input type=&#092;"text\" name=\"costam1\" style=\"width: 300px;\" value=\"$lina[0]\"><br> 
  17. <strong>Tresc</strong>:<br> 
  18. <textarea type=&#092;"text\" name=\"costam2\" style=\"height: 250px; width: 300px\">$lina[2]</textarea><br> 
  19. <strong>Dodał</strong>:<br> 
  20. <input type=&#092;"text\" name=\"costam3\" style=\"width: 300px;\" value=\"$lina[3]\"><br> 
  21. <strong>Data</strong>:<br> 
  22. <input type=&#092;"text\" name=\"costam4\" style=\"width: 300px;\" value=\"$lina[1]\"><br> 
  23. <strong>e-mail</strong>:<br> 
  24. <input type=&#092;"text\" name=\"costam5\" style=\"width: 300px;\" value=\"$lina[4]\"><br> 
  25. <input type=&#092;"submit\" value=\" Zmień \"><br> 
  26. </form> 
  27. </p> 
  28. </div></b></font> 
  29. </td></tr> 
  30. <TABLE BORDER=&#092;"0\" height=\"30\" WIDTH=\"465\" ALIGN=\"center\" CELLSPACING=\"0\" CELLPADDING=\"1\"> 
  31. <TD background=&#092;"tytul.gif\" WIDTH=\"465\" height=\"30\" ALIGN=\"center\" VALIGN=\"top\"> 
  32. <font size=&#092;"3\" color=\"white\"><div align=\"right\"></b>&nbsp; 
  33. </td></tr> 
  34. </table></table></table> 
  35. <br /> 
  36. &#092;"; 
  37. ?>


--------------------
Go to the top of the page
+Quote Post
Paul
post 28.11.2004, 13:38:36
Post #2





Grupa: Zarejestrowani
Postów: 636
Pomógł: 0
Dołączył: 22.10.2003
Skąd: Katowice

Ostrzeżenie: (0%)
-----


http://pl.php.net/nl2br drugi komentarz od gory...
Go to the top of the page
+Quote Post
akubiczek
post 28.11.2004, 13:39:13
Post #3





Grupa: Zarejestrowani
Postów: 189
Pomógł: 0
Dołączył: 4.07.2004
Skąd: z neostrady

Ostrzeżenie: (0%)
-----


str_replace" title="Zobacz w manualu PHP" target="_manual
str_ireplace" title="Zobacz w manualu PHP" target="_manual
preg_replace" title="Zobacz w manualu PHP" target="_manual

  1. <?php
  2. str_ireplace('<br />',&#092;"n\",$String);
  3. ?>


--------------------
pozdrawiam, Adam Kubiczek
kubiczek.eu
Go to the top of the page
+Quote Post
ADeM
post 28.11.2004, 13:47:04
Post #4





Grupa: Zarejestrowani
Postów: 455
Pomógł: 69
Dołączył: 23.10.2004
Skąd: Oświęcim

Ostrzeżenie: (0%)
-----


Dziekuje bardzo.. ale po co ireplace... ja dalem replace...


--------------------
Go to the top of the page
+Quote Post

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: 24.04.2025 - 05:17