数组PHP中的group fieldset元素

时间:2012-05-08 08:54:30

标签: php arrays

我有html表单和服务器端php。我想在HTML中对一些表单元素进行分组,因此它将在php中显示为类似

的数组
<fieldset>
    <input name="xx[]" type="text" />
    <input name="yy[]" type="text" />
</fieldset>
<fieldset>
    <input name="xx[]" type="text" />
    <input name="yy[]" type="text" />
</fieldset>

因此它将在php数组中显示为

array (
    [0] => array(
        [xx] => Array
            (
                [0] => 
                [1] => 
            )
        [yy] => Array
            (
                [0] => 
                [1] => 
            )
    ),

    [1] => array(
        [xx] => Array
            (
                [0] => 
                [1] => 
            )
        [yy] => Array
            (
                [0] => 
                [1] => 
            )
    );
);

0 个答案:

没有答案