I'm working on a education site for swedish-english language.
In my articles has example sentences, and I've enter these words into textarea. Its easily save my texts to database. But I want to insert my texts in one row like
id -- swedish_text -- english_text -- sort
1 -- text_sw -- text_en -- 1
Currently Im using this style for insert
id -- example -- sort
1 -- text1_sw -- 1
2 -- text1_en -- 2
Textarea import loop;
$exWords = explode(PHP_EOL, $_POST['ex_words']);
foreach($exWords as $k=>$v){
$myconn->query("INSERT INTO words SET example='" . $v . "',sort=". $k ."");
};
Thank you!