Dec 27, 2007, 9:55 AM
Post #1 of 6
I have an array that contains comma separated strings. The strings represent parameters for a router access list. Second and fourth parameters are source and destination IP addresses. I am looking to create another array with a unique combination of source and destination IPs (combination of parameter 2 and 4 ).
Looking for duplicates
Here is what array looks like
$array = tcp,188.8.131.52,,,184.108.40.206,,123
$array = tcp,220.127.116.11,,,18.104.22.168,,456
$array = tcp,22.214.171.124,,123,126.96.36.199,,
$array = tcp,188.8.131.52,,1234,184.108.40.206,,
$array = tcp,220.127.116.11,,456,18.104.22.168,,
Please note that the lines do not have duplicates.
What is the best way to parse out the the uniqe combinations of 2 ip addresses?