You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i have a list of IP's i want to pull out only the unique IP's (blocks) from the list.
For example, 192.168.0.0/32 is in 192.168.0.0/24 so it should just print the container 192.168.0.0/24 and the rest containers like ( 192.148.0.1/8 which include 192.148.0.1/9 ) and the rest of unique blocks.
My code like this, i was straggling with no correct results. thanks for
Hello,
i have a list of IP's i want to pull out only the unique IP's (blocks) from the list.
For example, 192.168.0.0/32 is in 192.168.0.0/24 so it should just print the container 192.168.0.0/24 and the rest containers like ( 192.148.0.1/8 which include 192.148.0.1/9 ) and the rest of unique blocks.
My code like this, i was straggling with no correct results. thanks for
`
$array1 = array('192.168.0.0/32', '192.148.0.1/8', '142.158.2.1/23', '192.148.0.1/9', '192.168.1.0/24', '192.168.0.0/24');
$res=[];
foreach($array1 as $key=> $blockx){
}
print_r($res);`
The text was updated successfully, but these errors were encountered: