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; }
2,
$arr = explode('-', '057188885281-001'); echo $arr[1];
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.