📜  php 删除 utf 不间断空格 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:58.375000             🧑  作者: Mango

代码示例1
Non-breaking spaces can be troublesome with trim:

// nbsp are translated to 0xA0, so use:
// UTF encodes it as chr(0xC2).chr(0xA0)
$converted = trim($converted,chr(0xC2).chr(0xA0)); // should work