Love2D how to use a string to add a texture

Keywords´╝Ü lua love2d

Question: 

It isnt the best title yeah but I dont know how to even summerize the problem. Im trying to "export" textures where itll be like "dirt" or something then once you enter that the texture itll be added to the screen. I already have the textures there I need to know how to use strings to add a texture. I hope that isnt too hard to read and understand.

Answers: