我必须将一个数组(表中的结果)传递给PHP页面。 $dataResource
是我的数组,我必须发送到Page.php
:
<a href="../../Page.php?d={$dataResources}" id="">
<input type="button" value="Create" style="float: right;">
</a>
答案 0 :(得分:0)
您可以简单地使用json_encode
函数作为$dataResources
的修饰符。
<a href="../../Page.php?d={$dataResource|@json_encode|rawurlencode}" id="">
在php中,使用json_decode
$data = json_decode($_GET['d'], true);