Home  >  Article  >  Backend Development  >  php截取特定段落怎么操作

php截取特定段落怎么操作

WBOY
WBOYOriginal
2016-06-13 12:44:07836browse

php截取特定段落如何操作
比如用户通过文本框输入一串字符
第一次输入的内容:$w1=" http://you.video.sina.com.cn/b/25323843-1272884840.html";
第二次输入的内容:$w2="http://v.youku.com/v_show/id_XMzIzNjA2NjE2.html";


第一次得到的结果:$val="25323843";
第二次得到的结果:$val="XMzIzNjA2NjE2";

假定上面两个值是用户自己分别输入的,请问程序怎样自动提取它们我所需要的值?能给个范例么?


求大家帮帮忙

Statement:
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