我正在尝试用下划线“_”替换以下变量中的空格
$e_type = 'Hello World TEST';
谁能帮帮我
最佳答案
你想要str_replace
:
$e_type = str_replace(' ', '_', $e_type);
关于php - 在php中用_替换空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2844719/
我正在尝试用下划线“_”替换以下变量中的空格
$e_type = 'Hello World TEST';
谁能帮帮我
最佳答案
你想要str_replace
:
$e_type = str_replace(' ', '_', $e_type);
关于php - 在php中用_替换空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2844719/