CodeIgniterPHP display value truncation solution. CodeIgniterPHP show interception ------------------------ The above shows: 057188885281-001 how to intercept-solve the following 001 prawns ------ solution ------------------ (PS: PHP technology ask CodeIgniter
PHPShow value truncation-value
-----------------------
Value shown above: 057188885281-001
How to intercept-later 001
Solving prawns
------ Solution --------------------
(PS:
PHP technical problemsWelcome to group 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 for CodeIgniter PHP display value truncation in this article. I hope this article will be helpful to php developers. thank you for reading this article.
Http://www.bkjia.com/PHPjc/621613.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/621613.htmlTechArticleCodeIgniter PHP show the interception-------------------------- the above shows: 057188885281-001 how to intercept-followed by 001 prawns solve ------ solution -------------------- (PS: PHP technical questions...