search

Home  >  Q&A  >  body text

How to deal with the problem that php obtains address bar parameters that contain []?

The address in phpcms contains info[***],
For example, an address is: test.php?info[title]=888&c=search
Pass
$tt=$ _GET["info[title]"];
echo $tt;
Cannot get 888, what should I do?

wangxiaowangxiao2379 days ago1320

reply all(5)I'll reply

  • wangxiao

    wangxiao2018-05-11 11:50:17

    Solved. Got it twice. Asked in csdn

    reply
    0
  • 徐金龙

    徐金龙2018-05-11 11:25:26

    I wrote it using yii2.0. I think you should write it as $_GET['info']['title']

    reply
    0
  • 徐金龙

    徐金龙2018-05-11 11:21:07

    You can pass an array and get the value in the array

    reply
    0
  • PHP中文网

    PHP中文网2018-05-10 12:31:36

    You can also get the complete URL and then use regular values ​​to get the value. Direct GET is probably not possible

    reply
    0
  • PHP中文网

    PHP中文网2018-05-10 12:29:06

    I’ve never written it like this before. If you can’t get it, just change the parameter name

    reply
    0
  • Cancelreply