Home  >  Article  >  Backend Development  >  怎么将个位十位百位.分开显示

怎么将个位十位百位.分开显示

WBOY
WBOYOriginal
2016-06-13 12:56:161772browse

如何将个位十位百位...分开显示?
如何将个位十位百位...分开显示?  比如  25341 分成 

2

 

5

 

3

 

4

 

1


------解决方案--------------------
$s = 25341;<br />
<br />
echo preg_replace('/\d/', "<p>\$0</p>", $s);
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