Everything works fine when in the array of numbers, but as soon as the text appears, it stops working, what did I miss?

$array = array(1,2,3,4,5); // если $array = array('один','два','три','четыре','пять'); то в БД не загружает 

$query = "INSERT INTO opisanie (text) VALUES (" . implode("), (", $array) . ")"; $res = mysql_query($query);

    1 answer 1

    You missed single quotes. Here so request try to feed

     $query = "INSERT INTO opisanie (text) VALUES ('" . implode("'), ('", $array) . "')"; 
    • Thanks for the answer, I’ll check it out - Ruslan Liashenka
    • damn, thank you very much, completely forgot about quotes, very embarrassing. Thank you so much. - Ruslan Liashenka