[PHP] Hashes in text files
Can I store Hashes in text files? If yes, how? Can I store a multi dimensional array in a text file? If not how should I do to store the data in one file and the pointer in another file? Thanx, Rodrigo
Re: [PHP] Hashes in text files
use mysql, forget about files.. they are too slow. Rodrigo a écrit : Can I store Hashes in text files? If yes, how? Can I store a multi dimensional array in a text file? If not how should I do to store the data in one file and the pointer in another file? Thanx, Rodrigo -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hashes in text files
On Friday 03 May 2002 15:16, Rodrigo wrote: Can I store Hashes in text files? If yes, how? Can I store a multi dimensional array in a text file? If not how should I do to store the data in one file and the pointer in another file? You can use serialize() on your array before you write to the file. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You are a bundle of energy, always on the go. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hashes in text files
On Fri, 3 May 2002, Rodrigo wrote: Can I store Hashes in text files? If yes, how? Can I store a multi dimensional array in a text file? If not how should I do to store the data in one file and the pointer in another file? http://php.net/serialize That function will turn any PHP data structure into something you can safely write to a file. Use unserialize to turn it back into its original form. However, based on what you plan to do, it seems like a database would be a lot less work and a lot more efficient. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php