在PHP发送阵列中_GET [英] sending arrays in _GET in php

查看:91
本文介绍了在PHP发送阵列中_GET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP提供了从发送_GET阵列的能力。

php gives the ability to send arrays from the _GET.

例如:

test.php?var1=abc&arr[0]=1&arr[3]=test

将输出:

Array
(
    [var1] => abc
    [arr] => Array
        (
            [0] => 1
            [3] => test
        )

)

这是考虑坏的编码?

is this consider bad coding?

推荐答案

没有,这是通常的做法。此外,它是与规模大于一发送选择自然的做法。

No, it's usual practice. Also it's natural practice for sending selects with size greater than one.

这篇关于在PHP发送阵列中_GET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆