开发者

replace spaces with _ in php

开发者 https://www.devze.com 2022-12-30 05:44 出处:网络
i am trying to replace spaces with underscore \'_\' in the following variable $e_type 开发者_Go百科= \'Hello World TEST\';

i am trying to replace spaces with underscore '_' in the following variable

 $e_type 开发者_Go百科= 'Hello World TEST';

can anyone help me please


You want str_replace:

$e_type = str_replace(' ', '_', $e_type);


str_replace


Check this. You have some nice examples there...

0

精彩评论

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