So I got function that prints out array score which concert clinics:
array_id clinic_id score_amount
0 1 5
1 2 1
2 3 5
3 5 3
4 8 2
And i got another function that prints out array clinics id like this: This array is for listing all clinics on page,
array_id clinic_id
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
Now my idea is to make array of clinic_id sorted accordinally to score_amount from first array. And theen if there is no score_amount for particular clinic_id, just go with order from second array normally.
So results needs to be sorted like:
array_id clinic_id
0 1
1 3
2 5
3 8
4 2
5 4
6 6
7 7
8 9
9 10