Php - backtracking maze generation (converting everything to 2d array)

     

Here generating a maze by backtracking works correctly but the thing is that I am trying to implement this in a pixel game (Minecraft)... so the problem is in drawing the maze. In this game the size of the wall blocks should be the exact same as the size of an empty block/space so the only solution I thought of was a bonus 2d array called totalmaze. Its purpose is to store both empty spaces and wall blocks so I made its size (x*3