When converting a character type to a time type, it is preceded by a foreach traversal time, which is converted into a time format by a time function;
Example:
<?php
echo "<pre>";
$lsrfield = Array (
0 =>array (
' Lsrtime ' = ' 1410710400 ',
' Lsrqian ' + ' improve personal data reward Points ',
),
1 =>array (
' Lsrtime ' = ' 2410710400 ',
' Lsrqian ' + ' improve personal data reward Points ',
),
2 =>array (
' Lsrtime ' = ' 3410710400 ',
' Lsrqian ' + ' improve personal data reward Points ',
)
);
Print_r ($lsrfield);
foreach ($lsrfield as $k = = $val) {
$lsrfield [$k] [' lsrtime '] = Date (' y-m-d h:i:s ', $val [' lsrtime ']);
}
Print_r ($lsrfield);
?>
The result of the converted output is:
Array ( [0] = = Array ( [lsrtime] = 2014-09-14 16:00:00 [Lsrqian] [+] + Perfect profile bonus points ) [1] = = Array ( [lsrtime] = 1910-04-17 11:18:24 [Lsrqian] + Refine profile bonus points ) [2] = = Array ( [lsrtime] = 1941-12-24 13:05:04 [Lsrqian] + improve personal data bonus points )
Through the above example, we can extrapolate, can use the same method can be converted to other character types;
PHP Multidimensional Array Conversion