-
php 에서 EOL 라인 바꾸기 \n 이거 왜 안되지 ㅠㅠ코딩Coding/Php 2022. 9. 22. 05:16728x90
https://stackoverflow.com/questions/21373478/n-vs-php-eol-vs-br
nl function을 만들어 준다. ㅎㅎㅎ 천잰데 ㅎㅎㅎ
<?php function nl($string) { if(isset($_SERVER['SHELL'])) return preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $string); return nl2br($string); } print nl("One\nTwo<br>Three\r\nFour<br />Five Six" . PHP_EOL); ?>
내가 연습중 ㅋㅋ
https://github.com/YoungHaKim7/Php_Lang/blob/main/execise/stack/index.php
반응형'코딩Coding > Php' 카테고리의 다른 글
16개 PHP Project(Login, Upload , Admin (0) 2023.04.15 PHP(4hr) Full Course for non-haters 🐘 (2023) (0) 2023.03.29 1. PHP소개(게시판 만들기도 있음 👍 (0) 2023.03.26 brew services start php (0) 2023.02.22 PHP Development Server <= 7.4.21 - Remote Source Disclosure (0) 2023.01.30 Create secure passwords in PHP (0) 2022.12.21 PHP ❤️Programming Language Tutorial - Full Course (0) 2022.09.21 php install 하다가 나온 메세지 공부하자 brew services restart php (0) 2022.09.21