Anyone know a way of preserving spaces when displaying text values in a page:
For example, if I have a database entry with the following:
(NOTE: I'm having to represent spaces with the - character as I type this as these forum pages have the same problem as I do in my pages🙂
1.-ooh
2.----------er
3.--------------------missus
then when I pull this value from my DB and display it then I am shown:
1.-ooh
2.-er
3.-missus
Is there a function that will swap my blank spaces for something that will display ok through HTML?
I'm already using nl2br() to preserve newlines, and I've tried using the str_replace to swap " " for " " but this only replaces one space and doesn't do the trick.
Thanks for any help,
B