PHP Parse URL From Current URL

前端 未结 6 946
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 05:38

I am trying to parse url and extract value from it .My url value is www.mysite.com/register/?referredby=admin. I want to get value admin from this url.

6条回答
  •  情歌与酒
    2021-01-29 05:52

    $referred = "referredby=admin";
    $pieces = explode("=", $referred);
    echo $pieces[1]; // admin
    

提交回复
热议问题