<?php
$data='1233_2';
print_r($data);
//取前面的内容
$orderid=substr($data,0,strrpos($data,"_"));
//取后面的内容
$stuid=substr($data,strripos($data,"_")+1);
echo '<br>';
print_r($orderid);
echo '<br>';
print_r($stuid);
substr具体说明
php文件运行-------->
打开phpstudy 运行起来,文件放到www目录下,即可运行php文件,可用localhost 或 127.0.0.1