PHP Array Storage

A

Anonymous

Guest
How can I do this:

when the script is run, it stores the information it recieves in from the arguments in an array.

it encrypts the array.

it writes the array to a file.


When another script is run it does this:

reads the file,

unencrypts the array,

it displays the data.
 
> when the script is run, it stores the information it recieves in > from the arguments in an array.
$arr_var = array(vr_01 =>($var01), vr_02 =>($var02) etc);
$arr_var = array(vr_01, vr_02 etc);
see array in manual.....
http://www.php.net/array

> it encrypts the array.
for what?
 
You cannot encrypt an "array" only a "string". Check on manual what the difference is.
 
mike said:
You cannot encrypt an "array" only a "string". Check on manual what the difference is.
as i understand his want to create personall wasswd file :D
 
No actually... I kinda wanted to do like this, it's for a posting thing.

text file as follows:
Code:
poll 1 (wow)
-question 1: 60  //60 is the number of votes
-question 2: 50
-question 3: 134
-question 4: 214 

poll2 (who)
-question 1: 13
-question 2: 1324234
-question 3: 1344
-question 4: 9834

This text file doesn't have to be encrypted, it's pretty much just for storing data from polls... they're not really questions but rather voting options.
 
Back
Top