- Joined
- Mar 25, 2007
- Messages
- 126
- Reaction score
- 0
Hi, i am having a bit of trouble with loading a map located in a text file into a 2 dimensional array. The map looks like this
The 6, and 7, are the dimensions for the array.
The trouble is that when i read the line in, it wont read the spaces so i sometimes get an index out of bounds error, so if anyone could help me read it in properly that would be great.
PHP:
6,7
#####
#D ##
#MBB #
## #
## #
##D#
###
The trouble is that when i read the line in, it wont read the spaces so i sometimes get an index out of bounds error, so if anyone could help me read it in properly that would be great.

