Multiple HTTP GET parameters with the same identifier

前端 未结 5 809
孤独总比滥情好
孤独总比滥情好 2020-12-03 14:47

Let\'s say I am getting requests such as:

http://www.example.com/index.php?id=123&version=3&id=234&version=4

Is it possible to extra

5条回答
  •  鱼传尺愫
    2020-12-03 15:28

    Just extract the keys and values of $_GET, use the function as:

    print_array('$_GET...',$_GET);
    

    ... and the function code will be:

    function print_array($title, $arr) {
        echo '';
        echo '';
        foreach($arr as $key => $value) {
            echo '';
                echo '';
                echo '';
            echo '';
        }
        echo '
    key of '.$title.'
    '; echo $key; echo ''; echo $value; echo '
    '; }

提交回复
热议问题