CURL和下拉数组

时间:2011-10-01 13:14:46

标签: php html curl

我正在尝试通过POST提交表单,但是该网站有区域和城市下拉列表,下拉列表就是这样构建的

每个区域都有下拉列表,但是它们隐藏了所以大多数都是region_id => '',但是我的帖子和帖子都是相同的,但它仍然说请选择一个城市,

他们的POST

Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY10] => 
            [MY07] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY08] => 
            [MY09] => 
            [MY11] => 
            [MY12] => 
            [MY13] => 
            [MY15] => 
            [MY16] => 
            [MY99] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e870291af244
)

我的阵列

    Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY07] => 
            [MY08] => 
            [MY09] => 
            [MY16] => 
            [MY12] => 
            [MY13] => 
            [MY10] => 
            [MY11] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e87114ddef0e
)

一直坚持这一点,任何人都有任何想法为什么会发生这种情况?谢谢!

1 个答案:

答案 0 :(得分:0)

通过[区] [州] =值解决,每个$ post [“district [”。$ st。“]”] = $ city;