%5B%和%5B0%之间的区别? [英] Difference between %5B% and %5B0%?
问题描述
jQuery .serialize()将"[]"转换为%5B%5D
jQuery .serialize() turns "[]" into %5B%5D
PHP http_build_query似乎将第一个[[]转换为%5B0%5D,第二个转换为%5B1%5D,依此类推.因此,它似乎正在使用某种计数器.
PHP http_build_query seems to turn the first "[]" into %5B0%5D, the second into %5B1%5D, etc. So it seems to be using some kind of counter.
为什么这些几乎相同的功能存在差异?
是不是让我的浏览器与众不同?如何确保http_build_query不添加额外的计数器(或让jQuery知道我需要额外的计数器).
Is it just my browser that makes them different? How can I make sure the http_build_query doesn't add the extra counter (or let jQuery know I need the extra counter).
推荐答案
%5B0%5D
是[0]
的编码版本,%5B1%5D
是[1]
的编码版本,等等.
%5B0%5D
is the encoded version of [0]
, %5B1%5D
is the encoded version of [1]
, etc.
%5B is [
%5D is ]
中间的数字是文字字符,不是任何%HH编码的一部分.
The number in between is a literal character, not part of any %HH encoding.
这篇关于%5B%和%5B0%之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!