pass array between two php files

后端 未结 4 1028
失恋的感觉
失恋的感觉 2020-12-12 07:21

I have a php file that needs to redirect to another, but I need to pass an array to the second file. How can I do this.

I know this is wrong, but I need something l

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 08:13

    Use http_build_query:

    header("Location: someurl.php?" . http_build_query($arr));
    

提交回复
热议问题