I need to know if there's a way in PHP to echo a string with every char.
For instance
/n
and the likes.
Edit for clarification:
When I have a webform and I submit it and I have this text:
I am stupid
and I cannot
explain myself
The text would be like this:
I am stupid /n and I cannot /n explain myself
If I use:
nl2br
I get:
I am stupid <br /> and I cannot <br /> explain myself
Now I have users that input some messed up texts and I need to clean it and put it inside an array. I would love to be able to print to screen every special char such as /n.