Home  >  Article  >  Backend Development  >  这样的数组为什么不能输出

这样的数组为什么不能输出

WBOY
WBOYOriginal
2016-06-13 12:30:23950browse

这样的数组为何不能输出
print_r  (array('1','2','3'));
输出没问题Array ( [0] => 1 [1] => 2 [2] => 3 )

$data = "'1','2','3'";
print_r  (array($data));
输出却是这样Array ( [0] => '1','2','3' )
要输出像这面一样,从一个变量赋值进去要怎么做才对,

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