Question: I am trying to return the highest percentage value along with all the other information like name,average, percentage, color etc in the array. 

```
foreach ($array as $value) {  
    $name = getName($value);
    $average = getAverage($value);
    $percentage = getPercentage($value);
    $color = getColor($value);

    return $percentage;
}

```

How can i implement the solution to find the desired value (highest percentage) and return it If an array. I am thinking sorting can be one way but i am still not clear how should i do it.

Answer: 
It may be an ugly solution but i ran into a similar problem before. What i did was, since it wasn't a huge problem, i took all the css from the 2nd one i couldn't add, and added it to the "main.css".
(mPDF ≥ 1.0)
============

use \Mpdf\HTMLParserMode::HEADER\_CSS as 2th parameter.

```
$stylesheet = file_get_contents('assets/css/main.css');
$mpdf->WriteHTML($stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS);

$stylesheetextra = file_get_contents('assets/css/test.css');
$mpdf->WriteHTML($stylesheetextra, \Mpdf\HTMLParserMode::HEADER_CSS);

```

Link [origin](https://mpdf.github.io/reference/mpdf-functions/writehtml.html)