user_id meta_key meta_value
1 name abc
1 email abc@gmail.com
1 phone 123
1 age 22
2 name pqr
2 phone 456
3 name xyz
3 email xyz@gmail.com
3 phone 789
4 name zzz
I have wordpress database saving user values as above but wile exporting this information to excel file, i want to format data as below.
user_id name email phone age
1 abc abc@gmail.com 123 22
2 pqr 456
3 xyz xyz@gmail.com 789
4 zzz
How it can be achieved?