We are passing the PHP recursive array code:
<ol class="dp-xml"> <li class="alt"> <span><strong><font color="#006699"><span class="tag"><?</SPAN><SPAN class=tag-name>php</SPAN></FONT></STRONG><SPAN> </SPAN></SPAN><LI class=""><SPAN>ignore_user_abort();//连线中断后(例如关闭浏览器)仍然继续执行以下的脚本直到处理完毕。 </SPAN><LI class=alt><SPAN>set_time_limit(0); </SPAN><LI class=""><SPAN>$</SPAN><SPAN class=attribute><FONT color=#ff0000>get_data</FONT></SPAN><SPAN> = </SPAN><SPAN class=attribute-value><FONT color=#0000ff>file_get_contents</FONT></SPAN><SPAN>("php://input"); </SPAN></SPAN><LI class=alt><SPAN>$</SPAN><SPAN class=attribute-value><FONT color=#0000ff>explode</FONT></SPAN><SPAN class=attribute><FONT color=#ff0000>explodeexplodedata</FONT></SPAN><SPAN> = explode("&", $get_data); </SPAN></SPAN><LI class=""><SPAN>foreach ($explodedata as $</SPAN><SPAN class=attribute><FONT color=#ff0000>key</FONT></SPAN><SPAN> =</SPAN><SPAN class=tag><STRONG><FONT color=#006699>></span></font></strong></span><span> $value)//还原数组 </span> </li> <li class="alt"><span>{ </span></li> <li class=""><span>list($realkey, $realvalue) = explode("=", $value); </span></li> <li class="alt"><span>$data[urldecode($realkey)] = urldecode($realvalue); </span></li> <li class=""><span>} </span></li> <li class="alt"><span>//现在$data数组已经和a.php中的一样了,接下来,就可以根据自己的需要对$data数组进行操作了。 </span></li> <li class=""><span>//...... </span></li> <li class="alt"> <span></span><span class="tag"><strong><font color="#006699">?></font></strong></span><span> </span> </li> </ol>
The above code is the detailed code of PHP recursive array , I don’t know if it will be of any help to newbies who are new to PHP.