求教:数据的格式话问题
数据源格式:
<br />$data = array(<br /> array('id' => 1,'pid' => 0,'name' => 'a'),<br /> array('id' => 2,'pid' => 0,'name' => 'b'),<br /> array('id' => 3,'pid' => 1,'name' => 'c'),<br /> array('id' => 4,'pid' => 1,'name' => 'd'),<br /> array('id' => 5,'pid' => 3,'name' => 'e'),<br /> array('id' => 6,'pid' => 3,'name' => 'f'),<br /> array('id' => 7,'pid' => 6,'name' => 'g'),<br /> array('id' => 8,'pid' => 6,'name' => 'h'),<br /> array('id' => 9,'pid' => 8,'name' => 'i'),<br /> array('id' => 10,'pid' => 8,'name' => 'j'),<br /> array('id' => 11,'pid' => 9,'name' => 'l'),<br /> array('id' => 12,'pid' => 9,'name' => 'm'),<br />);<br /><?php <br />$data = array(<br> array('id' => 1,'pid' => 0,'name' => 'a'),<br> array('id' => 2,'pid' => 0,'name' => 'b'),<br> array('id' => 3,'pid' => 1,'name' => 'c'),<br> array('id' => 4,'pid' => 1,'name' => 'd'),<br> array('id' => 5,'pid' => 3,'name' => 'e'),<br> array('id' => 6,'pid' => 3,'name' => 'f'),<br> array('id' => 7,'pid' => 6,'name' => 'g'),<br> array('id' => 8,'pid' => 6,'name' => 'h'),<br> array('id' => 9,'pid' => 8,'name' => 'i'),<br> array('id' => 10,'pid' => 8,'name' => 'j'),<br> array('id' => 11,'pid' => 9,'name' => 'l'),<br> array('id' => 12,'pid' => 9,'name' => 'm'),<br>);<br>/********我是YD的分割线*************/<br>$pid = 1000000;<br>//$mark = 'c';<br>foreach ($data as $key => $value){<br><br> if ($value[pid] == $pid) {<div class="clear"></div>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号