How to create array accessible by X and Y coordinates?
===

I am writing PHP script, which will store mouse position over the page with a timestamp. It will be used for generating simple heatmap.
I have MySQL database of X & Y coordinates and I thought, that I would do an array, which I would use for adding counts of appearances of the cursor over specific pixel.
It would work like this:
I read data from the database saying for example four recordings (x/y) 10/9,8/7,2/10,10/9
I would put 1 on each of the coordinates in the array, the last point would already in the array, so it would put 2 on x=10/y=9, as total count of mouse being over that pixel.

How should I make the array and how to read it?
