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

CodeIgniter PHP display value interception value solution_PHP tutorial

WBOY
Release: 2016-07-13 17:18:46
Original
791 people have browsed it

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;


}
Copy after login

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

2,


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

echo $arr[1];
Copy after login


------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...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template