KillerBean Posted September 1, 2006 Report Share Posted September 1, 2006 Probleema sekojosha... <textarea>'aa ir ierakstiiti teksti... saspaidiiti ENTER'i... kjipa ievietoti <br>.. bet kaa peec tam to ar PHP aizstaat ar <br> (ar funkciju str_replace)?? oki... zinaams pret ko jaaaizstaaj... bet ko..?? kaa ENTER'i defineejas?? Ceru ka saprataat ;) Paldies! Link to comment Share on other sites More sharing options...
v3rb0 Posted September 1, 2006 Report Share Posted September 1, 2006 http://php.net/nl2br Link to comment Share on other sites More sharing options...
Stopp Posted September 2, 2006 Report Share Posted September 2, 2006 (edited) nuu, ja tīri informācijai, tad enteri aizstājas ar \n vai \r\n no textarea Windows padod \r\n, citas os laikam \n, tāpēc man nepatīk nl2br funkcija, jo ņ tiek aizstāts, bet \r paliek. labāk lietot šādas 2 rindiņas $t=str_replace("\r\n", "<br/>", $t); $t=str_replace("\n", "<br/>", $t); ps. šī tēma neder sadaļā HTML un XHTML. Edited September 2, 2006 by Stopp Link to comment Share on other sites More sharing options...
KillerBean Posted September 3, 2006 Author Report Share Posted September 3, 2006 shii jau ir HTML un (X)HTML foruma sadalja. ;) Link to comment Share on other sites More sharing options...
bubu Posted September 3, 2006 Report Share Posted September 3, 2006 Bet tavai problēmai nav nekāda sakara ar HTML. Kāda HTML daļa gar to, kā php skripts apstrādā saņemtos datus? Link to comment Share on other sites More sharing options...
Recommended Posts