【问题标题】:I wanna replace the % mark to - this mark of url [closed]我想将 % 标记替换为 - 这个 url 标记 [关闭]
【发布时间】:2016-05-10 19:19:12
【问题描述】:

【问题讨论】:

  • str_replace("%", "-", $string);
  • $string = "http://localhost/news/news/6/1/my%news%of%bangla"; $string = str_replace("%", "-", $string); echo $string;
  • 谢谢兄弟,我只是忘记了这个方法..

标签: php .htaccess


【解决方案1】:

让你有一个标签

$pageName = "my news of bangla"; 
$pageUrl = str_replace("%", "-", $pageName); 

<a href="example.com/<?php echo $pageUrl; ?>"> my news of bangla </a>

然后用like

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-17
    • 2014-06-04
    • 2013-04-13
    • 1970-01-01
    • 2014-04-08
    • 1970-01-01
    • 2012-05-11
    相关资源
    最近更新 更多