I’d like to save an array to disk so that I can easily read it back into an array. What would be an easy way to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
And read it back by
Edit:
You can also use json_encode/json_decode instead. Check this question Preferred method to store PHP arrays (json_encode vs serialize) to get more information.