Home > Backend Development > PHP Tutorial > 怎么替换数组里面的键值

怎么替换数组里面的键值

WBOY
Release: 2016-06-13 12:32:38
Original
1023 people have browsed it

如何替换数组里面的键值。

本帖最后由 qq914260102 于 2013-11-28 15:03:47 编辑 比如我一个一个数组,$rs[]=$row["test"];
这个数组是(0,0,0,1,2,1,0,2,1,0)
我想把里面的
0替换成“是”,
1替换成“否”;
2替换成“未知”,
然后还是一个数组。。。

(是,是,是,否,未知,否,是,未知,否,是)
Related labels:
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