"Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Two questions:
> 1) Is it possible to write an array to a file?
What about using WDDX, an open XML-format for interchanging
data (see http://www.openwddx.org/) ?
You then will be able to do this:
$c = array("blue", "orange", "violet");
$f = fopen("MyFile.wddx", "w");
$fname = "MyFile.wddx";
$f = fopen($fname, "rb");
$packet = fread($f, filesize($fname));
$c = wddx_deserialize($packet);
> 2) Is it possible to specify the name of the key to each item of an array
> when you get the array using file().
Yep, you'll get the same array back...
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
- please remove the ".nospam" from address.
do you want to know more?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php