Home  >  Article  >  Backend Development  >  求施行字符串中PHP代码的写法

求施行字符串中PHP代码的写法

WBOY
WBOYOriginal
2016-06-13 10:32:41932browse

求执行字符串中PHP代码的写法。
下面的ASP代码是用一个循环把以数组值为名的表单项数据写入以数组值为名的变量中,请教一下循环中这句代码用PHP怎么写?

for i=0 to ubound(arrRecord)
  execute arrRecord(i)&"=request.form(arrRecord(i))"
next

------解决方案--------------------
这个得让懂asp的人来帮你看了...

如果是执行...那就用eval();去查一下eval函数用法
------解决方案--------------------
extract($_REQUEST);

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