Home >Backend Development >PHP Tutorial >How to write array to file in php_PHP tutorial
In PHP, we are provided with a function var_export, which can directly import PHP code into a file.
The code is as follows
|
Copy code
|
||||
var_export($times,true); the file cannot be written without adding true at the end
|
Use serializ and unserialize functions