PHP “backspace” character during output possible?

后端 未结 8 1109
囚心锁ツ
囚心锁ツ 2021-02-13 04:30

I have a feeling the answer is \"it\'s not possible,\" but thought I\'d ask to satisfy my curiosity.

I have some code that\'s echoed where the \\n is unavoidable:

<
8条回答
  •  南笙
    南笙 (楼主)
    2021-02-13 04:52

    Yes, the backspace character is ASCII character code 8 (According to the ASCII table), so you can output it in php using chr(). eg:

    echo 'ab' . chr(8);
    

    will output "a"

提交回复
热议问题