Advertisement

01.16.2003 at 02:34PM PST, ID: 20460682
[x]
Attachment Details

question about multidimentional array

Asked by Seever in PHP Scripting Language

Tags: array, multidimentional

Hello,

I have a array with ip addresses $a_ip and one with unique ip addresses $a_unique_ip

Now i want to count the identical ip addresses in $a_ip and put them into a multidimentional array.

I try to do something like that:

foreach($a_unique_ip as $key => $unique_value){
     $counter = 0;
     foreach($a_ip as $value){
          if ($unique_value == $value) {
               $counter++;
          }
     }
     //What do i put here????
     $a_unique_ip[$key][1] = $counter; //does not work
}

ideas????Start Free Trial
[+][-]01.16.2003 at 02:58PM PST, ID: 7744793

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.16.2003 at 10:10PM PST, ID: 7746302

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.16.2003 at 10:52PM PST, ID: 7746415

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2003 at 01:08AM PST, ID: 7746847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2003 at 01:27AM PST, ID: 7746912

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP Scripting Language
Tags: array, multidimentional
Sign Up Now!
Solution Provided By: sighmoon
Participating Experts: 4
Solution Grade: A
 
 
[+][-]01.18.2003 at 12:58AM PST, ID: 7752330

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32