Home  >  Article  >  Backend Development  >  为啥这两个数组会打印不一样

为啥这两个数组会打印不一样

WBOY
WBOYOriginal
2016-06-13 12:36:03797browse

为什么这两个数组会打印不一样。
$newsyids=1,3,5,8,7,5,3
$arr1= array($newsyids);
print_r($arr1);

$arr2= array(1,3,5,8,7,5,3);
print_r($arr2);

为什么这两个的打印结果不一样?
请高人指点?

打印arr1的情况是Array ( [0] => 1,3,5,8,7,5,3 )
打印arr2的啥情况是Array ( [0] => 1 [1] => 3 [2] => 5 [3] => 8 [4] => 7 [5] => 5 [6] => 3 )

我想arr1里面的是变量,同时打印结果钥匙arr2的样子,有啥办法吗?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn