Home  >  Article  >  Backend Development  >  CodeIgniter PHP display value interception value solution_PHP tutorial

CodeIgniter PHP display value interception value solution_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:18:46724browse

CodeIgniter PHP Display value interception-value


-----------------------
Value shown above: 057188885281-001
How to intercept-001 behind

Prawn solution
------Solution--------------------
(PS: PHP technical issuesWelcome to join the group for discussion: 276167802, verification: csl)

$str = '057188885281-001';

$str = $value['haoma'];


if (stripos($str, '-') !== FALSE) {


    echo substr($str, stripos($str, '-') + 1);


} else {


    echo $str;


}

------Solution--------------------

2,


$arr = explode('-', '057188885281-001'); 

echo $arr[1];


------Solution--------------------


The above is the value solution of this article about CodeIgniter PHP display value interception. I hope this article will be helpful to the majority of PHP developers. Thank you for reading this article.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/621613.htmlTechArticleCodeIgniter PHP display interception------------------- ---- What is displayed above: 057188885281-001 How to intercept - the following 001 prawn solution ------Solution -------------------- (PS: PHP technical questions...
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