Get an overall score for an array of weighted values
<p>I have an array of scores and each score is weighted for importance. I would like to get an overall score out of 100 depending on the score and the weight giving to each item.</p>

<pre><code>$array_one = array(
            array(
                'score' =&gt; 1.23,
                'max' =&gt; 10,
                'weight' =&gt; 10
            ),
            array(
                'score' =&gt; 56.78,
                'max' =&gt; 100,
                'weight' =&gt; 20
            ),
            array(
                'score' =&gt; 7.56,
                'max' =&gt; 10,
                'weight' =&gt; 20
            ),
            array(
                'score' =&gt; 4.67,
                'max' =&gt; 10,
                'weight' =&gt; 30
            )
        );
</code></pre>

<p>So if an item has a larger weight, it is giving a bigger percentage in the score out of 100. i.e if I get 4 scores equaling 50% of the max value in the range, but they all increase in weight 10,20,30,40, the second score has 10% more weight than the first, the third 20% more weight than the first, and the 4th 30% more weight than the first and so on. Also, some weights will be the same 10,20,20,30 or 10,10,10,10 etc. I hope this makes sense. So in summary each items score should be a percentage of the max value, then scores are weighted against 100. Expected results should return one overall score for all 4 items.</p>
