An example of writing array parameters in the URL address bar for transmission

零下一度
Release: 2023-03-12 22:16:02
Original
2982 people have browsed it

Today, a blogger encountered such a problem, that is, how to directly write array parameters in the browser URL address bar for transmission. I asked several colleagues around me, but no successful writing method was found. I started to wonder if I could write an array directly in the address bar for transfer. I started searching on Google and Baidu, but also found no useful information.

Perhaps, everyone rarely encounters such a situation.

In this way, I began to slowly try to write, and tried all the methods I was familiar with, but the transmission was still wrong. Finally, I accidentally copied one more parameter, clicked Enter, and the transfer was successful, and it was still an array result. Full of achievements in an instant, even though it is just a simple small application.

Hereby, I would like to write a post to share with all blogger friends! Here is how to directly write array parameters in the URL address bar for transfer:

[php] view plain copy

That is, repeat your array variable multiple times with different variable values!

//URL address directly passes 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
Copy after login

The above is the detailed content of An example of writing array parameters in the URL address bar for transmission. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template