Home  >  Article  >  Backend Development  >  php 转义方括号里头的方括号例如 $_POST['PordName[1]']

php 转义方括号里头的方括号例如 $_POST['PordName[1]']

WBOY
WBOYOriginal
2016-06-13 12:47:591106browse

php 转义方括号里面的方括号例如 $_POST['PordName[1]']
 $_POST[PordName[1]]我post 表达传值 



$_POST[PordName[1]]  里面的方括号怎么转义 $_POST["PordName\[1\]"]这样写不行,大神们 应该怎么写??

PHP 方括号转义
------解决方案--------------------
HTML

PHP
echo $_POST['PordName'][1];
Statement:
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