您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

一个php截取指定字符串其间的字符串的类

2025/9/15 21:49:43发布24次查看
一个php截取指定字符串之间的字符串的类
?
class get_c_str {var $str;var $start_str;var $end_str;var $start_pos;var $end_pos;var $c_str_l;var $contents;function get_str($str,$start_str,$end_str){ $this->str = $str; $this->start_str = $start_str; $this->end_str = $end_str; $this->start_pos = strpos($this->str,$this->start_str)+strlen($this->start_str); $this->end_pos = strpos($this->str,$this->end_str); $this->c_str_l = $this->end_pos - $this->start_pos; $this->contents = substr($this->str,$this->start_pos,$this->c_str_l); return $this->contents;}}?>
get_str('[123456789]','[',']');?>
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product