need help with this syntax it only stores the last value of my array into the database.
<?php
if(isset($_POST["submit"])) {
$lines=preg_split('/
|[
]/', $_POST['text']);
foreach($lines as $line => $value)
$quer = "INSERT INTO wew (wewe) VALUES('$value')";
if ($conn->query($quer) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $quer . "<br>" . $conn->error;
}
}
?>