I have an array of values that i would like to save in a longtext database field, one per line.
I'm using Yii 2.
If i save it like this:
$object->field = implode('\n', $array);
In php if you want to add new line then you have to use
\n with double-quotes. So code need to be:-
$object->field = implode("\n", $array);