Home > Backend Development > PHP Tutorial > php截取字符串,该怎么解决

php截取字符串,该怎么解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:33:01
Original
1079 people have browsed it

php截取字符串
/book/shopping/%E9%95%BF%E8%A3%99
php如何截取book/之后/%E9%95%BF%E8%A3%99之前的字符串

------解决方案--------------------

PHP code
$ar=preg_split('/[\/]/','/book/shopping/%E9%95%BF%E8%A3%99',-1,PREG_SPLIT_NO_EMPTY);
echo $ar[1]; <div class="clear">
                 
              
              
        
            </div>
Copy after login
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
Latest Issues
I received the gift book, thank you
From 1970-01-01 08:00:00
0
0
0
Why can't I find the book search?
From 1970-01-01 08:00:00
0
0
0
Recommend a book on thinkphp5
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template