This code will output a comma and semicolon delimited string which you can
place in a file action. Note that the funny indentation is important, and
be sure there are NOT any extra carriage returns after the last line.
<@ROWS ARRAY=foo
><@COLS
><@IF EXPR="<@CURCOL> > 1">,</@IF
><@OMIT <@VAR local$foo[<@CURROW>,<@CURCOL>]> ",;"
></@COLS
>;</@ROWS>
This format is the default format for the <@ARRAY> tag, so when you read the
file back in, you can just specify the file contents as the value of the
array:
<@ASSIGN local$foo <@ARRAY VALUE=<@VAR fileContentsFromRead>>>
If the thing you are writing is likely to contain commas and semicolons
choose two different characters.
-----Original Message-----
From: Wayne Irvine [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 7:07 AM
To: [email protected]
Subject: Witango-Talk: Storing Arrays
I am generating an array from a search action and writing it to a file.
I then wish to retrieve it later an use and an array.
When I write it to a file it is written as a HTML table.
When I read it back from the file it is a single var containing the HTML
table and data.
Can I specify a more relevant format for saving the array (tab delimited?).
How do I read it back and interpret it as an array?
Wayne Irvine.
Byte Services Pty Ltd
http://www.byteserve.com.au/
[EMAIL PROTECTED]
Ph 02 9960 6099 Mob 0409 960 609 Fax 02 9960 6088
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf