Not sure what this is called so that limits my ability to search for an answer.
I have a table with form submissions, each row is a single field from this form. Each group of fields (each submission) is tagged with a timestamp and an index number, such as 3247623445.8446. Each row also has a column that states the name of the field, and then another with the value for that field.
I need to select all of this data for export, grouping all the rows that in end in the same last 4 digits, so I can preferably create an associative array as such: $rows['8446'][fieldname] = $value.
would do the trick, assuming those numbers are stored as strings and not floats/doubles.
Of course, on a second read of your question, I’ve probably got that wrong. For your grouping in PHP, it’d be