Guest User

Untitled

a guest
Oct 17th, 2017
1,149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $str = "test1@gmail.com name1 surname1 patronymic1n
  2. test2@gmail.com name2 surname2 patronymic2n
  3. test3@gmail.com name3 surname3 patronymic3n
  4. test4@gmail.com name4 surname4 patronymic4"
  5.  
  6. foreach(explode("n", $str as array)){
  7. $list($email, $name, $surname, $patronymic) = explode(' ', $array){
  8. $final = ['email'=>$email, 'value'=>$name.' '.$surname.' '.$patronymic];
  9. }
  10. }
Add Comment
Please, Sign In to add comment