Home >Backend Development >PHP Tutorial >php怎么输出空格?

php怎么输出空格?

PHPz
PHPzOriginal
2016-06-13 10:50:4110434browse

php怎么输出空格?

php怎么输出空格?

空格是一个字符串,前后使用引号(单双均可),然后用echo就可以输出,例如下面的语句输出一个空格:

echo ' ';

一般情况下网页会过滤多余的空格,解决方法有两种,一是使用中文的全角空格,二是使用标准的特殊符号 ,下面的两个语句都分别是例子:

echo "  ";
echo "   ";

更多相关知识,请访问 PHP中文网!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn