note 45681 added to control-structures.foreach
| From: | php-general at lists dot php dot net | Date: | Wed, 15 Sep 2004 03:57:17 +0000 |
| Subject: | note 45681 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76702@lists.php.net to get a copy of this message | ||
###########################
·00039: if(!$ver && !$no_ver_list_cash) $ver = $ver_defecto;
·00040: if($vaciar_articulo){
·00041: $compra[$clase][$id][$articulo][$precio] = 0;
·00042: }
·00043: elseif(!$cantidad) $compra[$clase][$id][$articulo][$precio] = $cantidad_defecto;
·00044: elseif($cantidad) $compra[$clase][$id][$articulo][$precio] = $cantidad;
·00045: $imas=0;
·00046: $imas_inverso=0;
·00047: foreach($compra as $A => $X) {
·00048: foreach($compra[$A] as $B => $X) {
·00049: foreach($compra[$A][$B] as $C => $X) {
·00050: foreach($compra[$A][$B][$C] as $D => $X) {
·00051: if($A && $ver == 'activos') {
·00052: if($X){
·00053: $imas++;
·00054: $salida[$A][$B][$C][$D] = $X;
·00055: } elseif (!$X) $imas_inverso++;
·00056: }
·00057: if($A && $ver=='papelera') {
·00058: if(!$X){
·00059: $imas++;
·00060: $salida[$A][$B][$C][$D] = $X;
·00061: }
·00062: elseif($X) $imas_inverso++;
·00063: }
·00064: }
·00065: }
·00066: }
·00067: }
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45681
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45681&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45681&report=yes
Search -- http://master.php.net/manage/user-notes.php