Description of the instance in the URL address bar where the write array parameter is passed

Source: Internet
Author: User
Today, bloggers encounter such a problem, is how to directly write array parameters in the browser URL address bar to pass, asked several colleagues around, have not found a successful writing method. You start to wonder if it is possible to write an array directly in the address bar for delivery. Started in Google, Baidu search query, also did not find useful information.

Perhaps it is rare for people to encounter such a situation.

In this way, I began to slowly try to write, I am familiar with a few ways to try it all over again, still pass the wrong. Finally in the unintentional case, accidentally copied more than one of the parameters, click Enter, unexpectedly passed successfully, or array results. Instant achievements, although just a simple small application.

Hereby, write a post to the general Bo friends to share! Here's how to write an array parameter directly in the URL address bar for delivery:

[PHP] View plain Copy

That is, you repeat the array variable multiple times, the variable value is different!

URL address directly passing array parameters

localhost/api/public/yanglao/index.php?service=user.postservicepayment&elder_id=17&user_id=1592& pay_points=1&pay_money=0&charge_ids[]=1&charge_ids[]=2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.