How to get and change URL variable PHP

前端 未结 7 1721
梦谈多话
梦谈多话 2020-12-29 23:24

Hi could anyone help me with this I have a URL like

parent/child/a=1&b=2$c=3

then I have a link that would add variable to that URL

相关标签:
7条回答
  • 2020-12-30 00:06

    Try with the below expression, It Should Work

    preg_replace("#&d=.*&#", '&d=newvalue&', $_SERVER['REQUEST_URI'])
    
    0 讨论(0)
提交回复
热议问题