aaa,2=>bbb)",然后再file_put_contents,还有别的方法么,因为这个需要再次写下数组的 "/> aaa,2=>bbb)",然后再file_put_contents,还有别的方法么,因为这个需要再次写下数组的 ">
Home > Backend Development > PHP Tutorial > 怎么将数组写入php文件中

怎么将数组写入php文件中

WBOY
Release: 2016-06-13 12:55:17
Original
918 people have browsed it

如何将数组写入php文件中
假设有个$date=array(1=>aaa,2=>bbb)我想将他写入到一个.php文件中,该如何写呢,我只想到一个比较笨的方法$a="$date=array(1=>aaa,2=>bbb)",然后再file_put_contents,还有别的方法么,因为这个需要再次写下数组的


------解决方案--------------------
var_export
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