I'm retrieving some data from a database where the values might be something like the following:

```
Column1 | Column2
-----------------
Bob     | 24
Joe     | 17
Jimmy   | 38
Joe     | 10
Bob     | 5
Sam     | 8

```

With this data, I want to somehow select the Bob rows and multiply them together. I want to do this for all rows that match in Column1. I'm not concerned about doing it in SQLite, but what is the best way to go about this in PHP? I've currently added the results to an array in PHP by doing the following:

`$myArray[$resultRow['Column1']] = $resultRow['Column2'];`

I was wondering how to go about navigating through this and finding matching keys, multipying their values together, and outputting something like

`Column1 = Column2-a * Column2-b`