How can I pass array value from one page to another in php and retrieve value of that array in another page.
I have use array_push function to insert value of database in array using loop as below.
array_push($file_names,$row['sVoiceFileName'])));
Now, I want to pass $file_array variable to another page. I have try below code to pass array but doesn’t works.It only shows Array in the url.
echo "<a href='download.php?voice=". $file_names."'> ". "Download All"."</a>";
Is there any alternative way to pass array to another page or using post method. And How can I retrieve value in another page.
Here I am trying to download all the file included in array as zip. For that I have function
function zipFilesAndDownload($file_names,$archive_file_name,$file_path)
in another page. I need to pass $file_names array to that function.
What about this?
implode/explode you can also replace by json_encode/json_decode, serialize/unserialize, just on your wish.