Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

PHP remove duplicate values from multidimensional array

Avatar of cbastian-hill
cbastian-hillFlag for United States of America asked on
PHPWeb Applications
4 Comments1 Solution1248 ViewsLast Modified:
I'm trying to figure out how to merge duplicate array entries, in a multidimensional array.

Here's an excerpt of my data:

Accounting/Business - 86.02
   1->Demonstrate analytical and critical-thinking skills with direct application to business environments. => 85.71
   2->Communicate ideas and information effectively both orally and in writing. => 90.48
   3->Demonstrate skill in the use of computer software application and technology in business and industry. => 90.48
   4->Demonstrate skill in the use of computer software application and technology in business and industry. => 85.71

What I'm trying to do is find anywhere that the text is the same, and merge them into a single key=>value pair.  But aside from just merging the text, the numbers need to be added (and averaged) together to create a new number.

Ideally the above snip would become the following snip:

Accounting/Business - 86.02
   1->Demonstrate analytical and critical-thinking skills with direct application to business environments. => 85.71
   2->Communicate ideas and information effectively both orally and in writing. => 90.48
   3->Demonstrate skill in the use of computer software application and technology in business and industry. => 88.095

The new number (88.095) created by the following = ((90.48+85.71)/2).

Anyone have any ideas?  I have been trying to get this all day, but I can't seem to find any info that helps or figure it out myself...  Thanks for any assistance in this...

ASKER CERTIFIED SOLUTION
Avatar of MarcEasen
MarcEasenFlag of United Kingdom of Great Britain and Northern Ireland image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers