Let’s say I have a variable $foo:
$foo = " a a blablabla a a";
But when I do var_dump($foo) the following gets outputted:
string(57) " a a blablabla a a"
It’s like the length (57 in this case) it’s correct and it counts the spaces, but it doesn’t display them.
How can I display the full string, including the multiple spaces in between the other characters?
If you use
<pre>tag the text appears in the brower as you typed it. Couple of links:You could also replace spaces with non breaking space
.Web browsers ignore a lot white space in the code which is nice. Otherwise we wouldn’t be able to intend our source code or use newlines much…