Hi there,
Come arcross this site and looked through the searches for Multi Dimension Array's, but I am have prblems getting my head around it in PHP.
In VB6 (What I am used to) array was simple and you could define arrays as Userlist(10,4) which would give you a 4 coloumn, 10 row array that you could reference, but in PHP????
Anyway, I am programming some PHP. The data is coming from queries from a MySQL database and the returned rows are being work on an then I would like to store the result in an Array.
So for example I have the data I want to place into an array
Username,Qty,Used, left
Frank, 100,15,85
William, 100,35,65
Jonh, 110,102,8
In VB6 I would be passaing
Frank to Userlist(1,1)
100 to Userlist(1,2)
15 to Userlist(1,3)
85 to Userlist(1,4)
William to Userlist(2,1)
100 to Userlist(2,2)
35 to Userlist(2,3)
65 to Userlist(2,4)
etc etc
and then accessing the dat as Userlist(2,3)
I worked out how to use the seperate arrays but this will get difficult because I will then want to be able to sort on the multi Dimension array.
Any help would be greatful as I have a condition with remembering things.
Many thanks.