欢迎来到日本小春精选,了解日本先从@日本生活基础课程开始!
欢迎 欢迎     登录 | 注册      消息
当前位置: 首页小组技术交流PHP截取数字后三位

[一起讨论]PHP截取数字后三位

<span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; ">一数字&nbsp;</span><br style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; " /><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; ">$str &nbsp; = &nbsp; &quot;2222255555 &quot;;&nbsp;</span><br style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; " /><p><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; ">我需要取得它的后三位.如何做呢?</span></p><p><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; "><br /></span></p><p><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; "><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; ">$rest &nbsp; = &nbsp; substr(string,-3);</span><br /></span></p><p><span style="font-family: simsun; font-size: 14px; line-height: 23px; text-align: left; ">$str%1000</span></p>
2012-05-06 17:11:36 来自:球球
用户评论(0)
正序阅读
你的回应
登录 | 注册