小编low*_*tic的帖子

PHP:如何将数字拆分为多个字符串

我想拆分一个很长的数字,我在PHP中有多个字符串.我懂了:

<?php
$this = 020420151230;
?>
Run Code Online (Sandbox Code Playgroud)

我想得到这个结果:

//output:
    $this['day'] = 02;
    $this['month'] = 04;
    $this['year'] = 2015;
    $this['hour'] = 12;
    $this['minute'] = 30;
Run Code Online (Sandbox Code Playgroud)

能否帮助和建议我应该使用哪种功能?

php string datetime split function

0
推荐指数
1
解决办法
105
查看次数

标签 统计

datetime ×1

function ×1

php ×1

split ×1

string ×1