如何在 php 中将数组值从一个页面传递到另一个页面并在另一个页面中检索该数组的值。我已经使用 array_push 函数使用如下循环在数组中插入数据库的值。
array_push($file_names,$row['sVoiceFileName'])));
现在,我想将 $file_array 变量传递到另一个页面。我尝试了下面的代码来传递数组但不起作用。它只在 url 中显示 Array。
echo "<a href='download.php?voice=". $file_names."'> ". "Download All"."</a>";
有没有其他方法可以将数组传递到另一个页面或使用 post 方法。以及如何在另一个页面中检索值。在这里,我尝试将数组中包含的所有文件下载为 zip。为此我有功能
function zipFilesAndDownload($file_names,$archive_file_name,$file_path)
在另一个页面中。我需要将 $file_names 数组传递给该函数。