Created
December 17, 2024 09:00
-
-
Save shohag-cse-knu/18768891176ac580304c9dace98601c9 to your computer and use it in GitHub Desktop.
Removing newline from db columns using PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo htmlspecialchars_decode(str_replace(array("\r\n", "\r", "\n"), "<br />", $var)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment