-3
我有以下查詢字符串:
"active_tab=delivered&active_tab=all&active_tab=delivered&active_tab=outstanding
&active_tab=delivered&active_tab=outstanding&active_tab=all&active_tab=delivered&active_tab=outstanding&title_filter=conformance&title_filter=delivering&title_filter=packaging
&title_filter=delivering&title_filter=all&title_filter=delivering&title_filter=all&title_filter=packaging&title_filter=conformance&title_filter=packaging
&title_filter=delivering&title_filter=packaging&title_filter=ordered"
我將如何解析最終title_filter
(「有序「)和active_tab
(」交付「)從上面的查詢字符串?此外,如果查詢字符串變量不存在,有它= ""
這是所有的查詢字符串?它有多個相同的密鑰! –
'explode(「&」,$ array);'while while循環數組; 'explode(「=」,$ element);'第一個數組的每個元素......用令牌做東西... – crush
我寫了這段回來,你可以看看它是否適用於你:https:// gist.github.com/3528917 –