SHARE
TWEET

Untitled

a guest Oct 17th, 2017 1,094 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top