note 17863 added to function.str-repeat
| From: | dan at daniellampert dot com | Date: | Sat, 29 Dec 2001 20:23:53 +0000 |
| Subject: | note 17863 added to function.str-repeat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23940@lists.php.net to get a copy of this message | ||
The function str_repeat() doesn't seem to work when generating spaces for web page output.
There's a reason for this: the web browser is removing the excess spaces and, instead,
displaying only one space. So, two ideas:
1. If you were just checking your work by outputting variables on the screen, then don't worry.
It's actually working right. You just can't see it.
2. If you really want the spaces to appear on the web page, use the function this way:
str_repeat(" ",$num);
Hope this helps.
--
http://www.php.net/manual/en/function.str-repeat.php
http://master.php.net/manage/user-notes.php?action=edit+17863
http://master.php.net/manage/user-notes.php?action=delete+17863
http://master.php.net/manage/user-notes.php?action=reject+17863