I have an array
$array = [
0=>1
1=>Jon
2=>jon@email.com
3=>2
4=>Doe
5=>doe@email.com
6=>3
7=>Foo
8=>foo@email.com
]
What I`d like to do is to add and extra value to each value. Something like this so I can access it when looping through the array
$array=[
0=>1[id]
1=>Jon[name]
2=>jon@email.com[email]
3=>2[id]
4=>Doe[name]
5=>doe@email.com[email]
6=>3[id]
7=>Foo[name]
8=>foo@email.com[email]
]
I guess it would be a multidimensional array? What would be the proper way of doing it?