Passing arrays as url parameter

前端 未结 10 1764
礼貌的吻别
礼貌的吻别 2020-11-22 12:32

What is the best way that I can pass an array as a url parameter? I was thinking if this is possible:

$aValues = array();

$url = \'http://www.example.com?a         


        
10条回答
  •  醉酒成梦
    2020-11-22 12:49

    I do this with serialized data base64 encoded. Best and smallest way, i guess. urlencode is to much wasting space and you have only 4k.

    • why: http://mizine.de/html/array-ueber-get-url-parameter-uebergeben/
    • how: https://gist.github.com/vdite/79919fa33a3e4fbf505c

提交回复
热议问题