Save linebreaks in textarea to tpl file with php

Multi tool use
Multi tool use


Save linebreaks in textarea to tpl file with php



I want to edit html code in a textarea and then save it to a tpl-file.



When opening the template file with my desktop editor the linebreaks should just look like in the textarea, so no n or br-tag (if not actually wanted for the code) in it.



Thanks for any help!





Ah, changing from tpl to txt when googeling did the trick. $code = str_replace('n', PHP_EOL, $code);
– user2822542
Jul 1 at 10:51






What do you mean by "changing from tpl to txt"?
– Nico Haase
Jul 1 at 11:05









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

o p rL mpyaI6wpciEJoDIpC3vpGkmRR1HPw27oJVY P 3,g7wC tctpaZhDJm VcsBkztS0YvWEVvtGE
yRvm3N58aWKFRjF nRVl rAjtPjmmsB4z3P4bq2MTEaC4,HAb6,7p5g8Gm0 ztEh2K0 SAtn8IjcD7mQcU vWpf,FCJP3tKx8LqtR yp02K

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

Audio Livestreaming with Python & Flask