我有这个参数链接:
http://example.com/article?id=571&id=550&id=276
我希望获取所有 id 值,形成一个数组并输出到一个字段,我尝试了几种方法,但都没有成功,有人可以帮忙吗?谢谢
if (isset($_GET['id'])){
// create an array to store all ids from the parameter
// Output each values in the array to $string variable
$form['submitted']['my_field']['#value'] = $string; // output all ids via this field.
}; //endif ;
我希望它会在现场像这样输出:“571、550、276”