php提取字符串参数

来源:互联网 发布:centos搭建web服务器 编辑:程序博客网 时间:2024/05/01 16:26

$str = "article.php?cate_id=15&id=54";


$begin = stripos($str, "=")+1;


$ends = stripos($str, "&")-$begin;


echo substr($str,$begin,$ends);

0 0
原创粉丝点击