Issue
I have a two-dimensional array like this:
(0|0),(0|1),(0|2)
(1|0),(1|1),(1|2)
I know the width and height of the array. I want to calculate the indexes as a single number like this:
0,1,2
3,4,5
How do I do this?
Solution
Looks like index = row * width + column
to me.
Answered By - jurez Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.