a.binder il y a 9 ans
Parent
commit
3b6e5d99fc
1 fichiers modifiés avec 11 ajouts et 10 suppressions
  1. 11 10
      SE/dev/php-cli/biale_put_Cables_to_PE.php

+ 11 - 10
SE/dev/php-cli/biale_put_Cables_to_PE.php

@@ -90,18 +90,19 @@ foreach($cables_from_joins_to_PE->xpath('cable_to_PE_to_be_calculated') as $chil
 		   $cables_from_joins_to_PE_arr[$id_j]['ID_Way']=$ID_Way;
 		   $cables_from_joins_to_PE_arr[$id_j]['ID_Point']=$ID_Point;
 		   
-		   $detect_next_PE=$Path_Point_xml->xpath('detect_next_PE');
 		   
-		   		foreach($detect_next_PE->attributes() as $a=>$b) {
-			   		if($a=='len') $len=$b[0];
-			   		if($a=='PE_ID_Join') $PE_ID_Join=$b[0];		   
-	   			}
-	   			settype($len, "integer");
-	   			settype($PE_ID_Join, "integer");
-	   			
-	   	   $cables_from_joins_to_PE_arr[$id_j]['len']=$len;
-		   $cables_from_joins_to_PE_arr[$id_j]['PE_ID_Join']=$PE_ID_Join;
+		    foreach($Path_Point_xml->xpath('detect_next_PE') as $detect_next_PE ) {
 		   
+			   		foreach($detect_next_PE->attributes() as $a=>$b) {
+				   		if($a=='len') $len=$b[0];
+				   		if($a=='PE_ID_Join') $PE_ID_Join=$b[0];		   
+		   			}
+		   			settype($len, "integer");
+		   			settype($PE_ID_Join, "integer");
+		   			
+		   	   $cables_from_joins_to_PE_arr[$id_j]['len']=$len;
+			   $cables_from_joins_to_PE_arr[$id_j]['PE_ID_Join']=$PE_ID_Join;
+			   }
 			}
 }