I am trying to append to my page an array inside a TextArea and I break it every time I have a space between characters in array. Let's say I have ingredients in array: "rice", "oil", "soy milk", "apple" I am using the following JQuery syntax:
$("#container").append("<input type = 'text' id = 'ingredients' value = " + ingArrayTest+ ">");
My final result will have only: "rice, oil, soy" because space will break the rest of the array in the display. Is there a way to wrap the array so it doesn't happen?
Thanks in advance!