Home  >  Article  >  Backend Development  >  小弟我有一个二维数组,小弟我想编辑内容后,保存为新的二维数给行吗

小弟我有一个二维数组,小弟我想编辑内容后,保存为新的二维数给行吗

WBOY
WBOYOriginal
2016-06-13 13:37:16811browse

我有一个二维数组,我想编辑内容后,保存为新的二维数给行吗
我从缓存里读出一个二维数组A,把二维数组的值用一个列表表显出来,然后
 修改列表的值,点保存,覆盖原数组A,

这个效果可以实现吗??

------解决方案--------------------
我汗...
你的缓存载体是什么?
------解决方案--------------------

探讨

载体 文本文件

------解决方案--------------------
然后你想干什么?
结构蛮复杂的
------解决方案--------------------
$ar = include('数据文件名');

$ar[0]['type'] = $ar[1]['type'];

file_put_contents('数据文件名', '
------解决方案--------------------
数组序列化呢?
------解决方案--------------------
这么复杂的数据为什么不存到数据库中?这样可以针对具体的某个值进行操作,相当方便。只需要将表关系连接好就可以了。
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