When echoing text with PHP, if the string contains more than one space, the extra spaces are lost when rendered in the browser.
the following is a workaround;
str_replace(' ', ' ', $my_text);
This is especially important if we want to display values returned from a database query and the value has a double space for example and of course if that double space is important.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.