变量怎么转换成数组里面的内容

WBOY
Release: 2016-06-23 14:22:49
Original
805 people have browsed it

$contt='"1","2","3","4"';
session_start();
$ar=array(
$contt
);
$an=array(
"1",
"2",
"3",
"4",
);

$contt要用什么函数进行转换呢?ar和an才会是一样的。


回复讨论(解决方案)

$ar=explode(',',$contt); //这样不就行了

我已经试了这种 真的不行啊

已经解决了凤飞飞凤飞飞

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template