Inserting a Hard Return
"WASSSSSSSSSSSSUPPPPPPPPPPP"
Anyways...I have a form that is submitted to a MySQL dB by PHP, and in that form there are all sorts of ' ? ! and things, as well as hard returns (what or \n does). Then another piece of PHP grabs the data and displays it. How can I parse so that the hard returns, on submission, enter \n in place of it, and how do you parse ' " ? ! to display normally, instead of being
Quote:
hello y\'all
Thanks!
Chroder posted this at 21:13 — 7th March 2004.
He has: 91 posts
Joined: Mar 2004
If I understood you correctly, stripslashes() should be what your looking for.
<?php
$mytext = stripslasehs($crazytext);
?>
kb posted this at 01:34 — 8th March 2004.
He has: 1,380 posts
Joined: Feb 2002
Thanks...but I am also looking for more than that...when you have something like this:
it needs to be
Busy posted this at 04:09 — 8th March 2004.
He has: 6,151 posts
Joined: May 2001
something like nl2br ?
kb posted this at 04:22 — 8th March 2004.
He has: 1,380 posts
Joined: Feb 2002
Yes'm. Thanks.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.