Blogger Information
Blog 263
fans 3
comment 2
visits 113253
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP截取两个指定字符中间的字符和截取后两个/之间的字符
福哥的博客
Original
2584 people have browsed it
<?php
$a =  "123@abc#456";
$b = (strpos($a,"@"));
$c = (strpos($a,"#"));
echo substr($a,$b+1,$c-1);
?>
$str = $_SERVER[REQUEST_URI];
$arr = explode("/",$str);
$last = $arr[count($arr)-2];


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post