i am trying to store data in a text file, something like an array into a text file using php instead of storing into mysql database.
for example here are the data to
Storing:
1. Use serialize() to serialize your array into a string
2. Write that string to text file using file_put_contents()
Reading:
1. Use file_get_contents to read text file
2. Use unserialize() to unserialize previously serialized array
serialize()/unserialize() can be replaced by json_encode()/json_decode()