I think if I try to research this info more time then I'll find an answer, but I just don't have any energy anymore. Maybe it's silly question, but I hope that you'll try to understand and help without any ridicules. (I've been studying more than 16+ hours some other topics and always missing this one).
Question: I've a file which contains: Email name surname patronymic "\n" Email name surname patronymic "\n" etc
and I just stock on the reading this info on the array... I need an assyc array:
$array = ["email" => $myEmail, "wholeName" => $name+$surname+$patronymic];
Maybe it could be done something in this way:
foreach (explode("\n", $str) as $pair) {
list($key, $value) = explode(' ', $pair);
$final[] = ['email'=>$key, 'value'=>$value];
}
But this code will generate only this array:
$final[] = ['email'=>$email, 'value'=>$name];
But I need surname and patronymic as well too. Maybe someone from you know the good way for this? It would help me a lot.
One more time: I think I'll find an answer, but I'm really tired and go to sleep and just want to wake up and find an answer here. Thanks in advance.