I have a large SQL query which returns aggregate data.
My returned array is something like this:
array(37) { // I get 37 arrays returned
[0] => array(10) {
["groupId"] => string(1) "3" // the first param is just an id
["sessionCount84"] => string(1) "0"
["sessionCount1"] => string(1) "1"
} ...
Each sub-array will contains multiple keys with the word 'sessionCount' and a number following that and there could be many of them.
Is there a way to get all the values for keys which contain the words 'sessionCount[someNumber]" ?
I tried the array_keys function in php, but that requires an exact word match, meaning I would need to know the number following 'sessionCount' in the key, so I'd need to get all the keys that contain that word first somehow.