日期:2014-05-17 浏览次数:20545 次
"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"
)
echo $arr[8] + 0; //结果为0
$num = "1333230069";
echo $num+0;//1333230069
<?php
$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])."<br>";
echo $arr[8]."<br>";
$str1=$arr[8]+0;
echo gettype($str1)."<br>";
echo ($str1)."<br>";
$num = "1333230069";
$num1=($num+0);
echo gettype($num)."<br>";
echo gettype($num1)."<br>";
echo $num1;
?>
$arr = '"1000","