php字符串处理函数相关操作
<?php
//获取tech和98426这两个字符串
$str = "http://info.meadin.com/tech/98426_1.shtml";
echo $newstr = substr($str,7,strlen($str)); //info.meadin.com/tech/98426_1.shtml
$arr = explode('/',$newstr);
$num = $arr[1];//tech
//获取tech和98426这两个字符串
$str = "http://info.meadin.com/tech/98426_1.shtml";
echo $newstr = substr($str,7,strlen($str)); //info.meadin.com/tech/98426_1.shtml
$arr = explode('/',$newstr);
$num = $arr[1];//tech
$user = strstr($arr[2], '_', true); //98426