Store data in a file

Hi, i have a tile based map system. I want to make a file for store this data. This is my tile data

    tile[5, 2] = 1; // 5 is position X / 2 is position Y / 1 is tile number in a list 
    tile[3, 1] = 0;
    tile[5, 2] = 3;
    .........400 more

i have many ships and ships has many tiles (smallest ship has 400~ tile) .this means so much mass in main script. So i want to make this simple and store it in a file and access it easily.

I’d recommend using a tile editor like mapeditor.org, which stores tilemaps in a standard XML file format.