时间:2021-07-01 10:21:17 帮助过:3人阅读
"1000","902865066306","02865066306","SIP Phone","IP Trunk","","trunk20","ON2OFF","1333230069","1333230072","1333230134","65","62","Connected"
$arr = '"1000","902865066306","02865066306","SIP Phone","IP Trunk","","trunk20","ON2OFF","1333230069","1333230072","1333230134","65","62","Connected"';
$arr = explode(',',$arr);
print_r($arr);
Array
(
[0] => "1000"
[1] => "902865066306"
[2] => "02865066306"
[3] => "SIP Phone"
[4] => "IP Trunk"
[5] => ""
[6] => "trunk20"
[7] => "ON2OFF"
[8] => "1333230069"
[9] => "1333230072"
[10] => "1333230134"
[11] => "65"
[12] => "62"
[13] => "Connected"
)
结果为0
echo $arr[8] + 0; //
$num = "1333230069";
echo $num+0;//1333230069
$arr= Array
(0 => "1000",
1 => "902865066306",
2 => "02865066306",
3 => "SIP Phone",
4 => "IP Trunk",
5 => "",
6 => "trunk20",
7 => "ON2OFF",
8 => "1333230069",
9 => "1333230072",
10 => "1333230134",
11 => "65",
12 => "62",
13 => "Connected"
);
echo gettype($arr[8])."
";
echo $arr[8]."
";
$str1=$arr[8]+0;
echo gettype($str1)."
";
echo ($str1)."
";
$num = "1333230069";
$num1=($num+0);
echo gettype($num)."
";
echo gettype($num1)."
";
echo $num1;
?>
$arr = '"1000","902865066306","02865066306","SIP Phone","IP Trunk","","trunk20","ON2OFF","1333230069","1333230072","1333230134","65","62","Connected"';