I'm using a bootstrap tagsinput to insert values into bd, but values are being stored in a single string, for example: "256,257,299". I would like these values to be defined in an array and look like this: ["256", "257", "299"], then I give a foreach and each value goes to its proper place in bd. As it is today, all in a single string only the first id is being sent to the bd.
Does anyone know how to do this?
This is my input:
<input type="text" id="taginput" data-role="tagsinput" name="idrelacionado[]">
Thank you for your attention!