【发布时间】:2018-12-01 08:44:10
【问题描述】:
我是 php 新手, 我想使用 $_GET 和数组获得这些结果:
http://127.0.0.1/get.php?id=0 i want to display to me example0
http://127.0.0.1/get.php?id=1 i want to display to me example0
http://127.0.0.1/get.php?id=2 i want to display to me example0
http://127.0.0.1/get.php?id=3 i want to display to me example0
我试过这个:
<?php
$names=array('example0','example1','example2','example3');
echo $_GET[names];
?>
而且不工作!
【问题讨论】:
-
嗯?不知道你在问什么
-
如何在 URL 中传递该数组?
-
您想使用数组来创建 URL 还是要接受来自 get 参数的数组?