怎的清除指定字符前的所有字符串

WBOY
Release: 2016-06-13 12:36:37
Original
1327 people have browsed it

怎样清除指定字符前的所有字符串?
字符串如下,我想清除vid=及之前的字符,也就是只保留198445623。这其中只有vid=是固定的字符。
http://ooioosy.wwowo9e.com/owuiwd/vid=198445623

我现在的方法是这样的,通过计算vid=的位置来清除,有没有更节省系统资源的方法?
$vid = "http://ooioosy.wwowo9e.com/owuiwd/vid=198445623"
substr($vid,(stripos($vid,'vid=')+4));

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!