开发者

Can I change tab width (\t) in a PHP string?

开发者 https://www.devze.com 2023-01-18 17:42 出处:网络
I\'m not even sure if its possible, but I\'d like to change the value of \\t in PHP strings. For example,开发者_如何学运维 currently if I do this:

I'm not even sure if its possible, but I'd like to change the value of \t in PHP strings. For example,开发者_如何学运维 currently if I do this:

echo "\t\tHello";

The output is 16 spaces followed by hello - so the tab width is 8 spaces. Is there a way to change this default tab width to another number when using \t in strings?

Its not really all that important that I do so, and there are numerous, obvious work arounds, just wondering if I'm missing out on something easy to do and can't find.


The tab width is not specified by PHP, but by the program which views it. If you view it in an editor, you can set the tab width in the editor.

0

精彩评论

暂无评论...
验证码 换一张
取 消