I have a form with <textarea>
with the following value:
<textarea id="lista-ingredientes" name="lista-ingredientes">
<ul>
<li>sal</li>
<li>pimenta</li>
</ul>
<textarea>
I need to send the form, PHP "break" the items of <li>
into separate variables to add a line of each item, what I have is this, but it inserts everything in a single line:
$sql = "INSERT INTO receitas_ingredientes (id, ingrediente) VALUES ('NULL', ".$_POST['lista-ingredientes'].")";
I think it's something using explode and foreach, but I'm not very knowledgeable and could not mount