RE: [PHP] stupid little problem
| From: | Christoph Starkmann | Date: | Fri, 16 Nov 2001 12:43:30 +0000 |
| Subject: | RE: [PHP] stupid little problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74858@lists.php.net to get a copy of this message | ||
Hi!
> a$ = "test";
> b$ = "test2";
> data$ .= a$ . " " . b$ " ";
> echo data$;
>
> it outputs:
> "test test2"
> instead of:
> "test test2 "
>
> I really need that spaces..
> any help?
HTML is "normalizing" all text; So any number of spaces, tabs newlines etc.
become one space " ";
If you want a certain number of spaces, you could use the -entity:
$a = "test";
$b = "test2";
$data = $a . " " . $b .
" ";
echo $data;
Greets,
Kiko
-----
It's not a bug, it's a feature.
[.nfq]
christoph starkmann
tel.: 0821 / 56 97 94 34
fax.: 0821 / 56 97 94 38
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-----