我如何爆炸的整数。 [英] How do I explode an integer

查看:145
本文介绍了我如何爆炸的整数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的答案可以很容易。但我很新鲜编程。所以,请温柔...

the answer to this could be easy. But I'm very fresh to programming. So be gentle...

我在工作尝试为自己的一个客户做到速战速决。我想要得到的数字的总数在一个整数,然后爆炸的整数:

I'm at work trying to do a quick fix for one of your customers. I want to get the total numbers of digits in a integer, and then explode the integer:

rx_freq = 1331000000 ( = 10 )
  $array[0] = 1
  $array[1] = 3
  .
  .
  $array[9] = 0

rx_freq = 990909099 ( = 9 )
  $array[0] = 9
  $array[1] = 9
  .
  .
  $array[8] = 9

我不能使用爆炸,因为该功能需要一个分隔符。我搜索了eyh'old谷歌和#1。

I'm not able to use explode, as this function need a delimiter. I've searched the eyh'old Google and Stackoverflow.

基本上是:我如何爆炸的整数,未分隔符,以及如何找到位数的整数号

Basically: How do I explode an integer without delimiter, and how do I find the number of digits in an integer.

推荐答案

$阵列= str_split($ INT) $ NUM_DIGITS = strlen的( $ INT)应该只是罚款。

这篇关于我如何爆炸的整数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆