【发布时间】:2015-12-11 16:19:59
【问题描述】:
我想删除 '%'
echo '<a href="/coupon/'.$post->slug.'/'.$dcount.'/'.strtolower(str_replace(' ','-', $drow['title'])).'" target="_blank">';
有什么建议吗?谢谢
【问题讨论】:
-
你已经知道替换东西的功能了:
str_replace(),那么问题出在哪里? -
由于某种原因无法正常工作...您能提供示例吗?
-
“不工作”是什么意思?你有任何错误吗?在文件顶部添加error reporting:
ini_set("display_errors", 1); error_reporting(E_ALL); -
你想在哪里替换
%?%包含什么?你试过urlencode; php.net/manual/en/function.urlencode.php? -
@JoseSalazar 阅读有关
str_replace()的手册
标签: php string replace special-characters