如果完全按你字面的翻译为:
a.php文件内容:
<?phpfor ($i=0; $i<5; $i++) {
$arr[] = $i; // $arr[$i] = $i
}
$str = implode(",",$arr); //其实直接传递数组就是了,干吗这么搞一下?
echo "<a href=test.asp?tempstr=$str>传送数组内容</a>";
?>test.php内容: 
<?php
tempstr=explode(",",$_GET['tempstr']); //如果GLOBAL开启的话直接用$tempstr
echo tempstr[0] . "<br>" . tempstr[1];
?>其实PHP比ASP代码可以简洁许多

解决方案 »

  1.   

    或考虑以下处理:a.php文件内容:
    <?phpfor ($i=0; $i<5; $i++) {
    $arr[] = $i; // $arr[$i] = $i
    }
    echo "<a href=test.asp?tempstr=".serialize($arr).">传送数组内容</a>";
    ?>test.php内容: 
    <?php
    $tempstr=unserialize($_GET['tempstr']); //如果GLOBAL开启的话直接用$tempstr
    echo $tempstr[0] . "<br>" . $tempstr[1];
    ?>
      

  2.   

    <?
    for($i=0;$i=100;$i++)
    $array[]=$i;
    $_SESSION['array']=$array;
    ?>the other page;
    <?
    echo $_SESSION['array'][20];//肯定会输出20
    ?>就是说 session可以存数组 甚至可以存对象