Not sure if there is a built in function to do this, so I thought I would ask before I waste the time of writing one. Lets say I have an array:
Array
(
['first_name'] => John
['last_name'] => Doe
['ssn1'] => 123
['ssn2'] => 45
['ssn3'] => 6789
)
How can I create new key ['ssn']
which will combine the values of the other three, to result in the following:
Array
(
['first_name'] => John
['last_name'] => Doe
['ssn'] => 123456789
)
It comes in separated because there are 3 separate inputs like such [ ]-[ ]-[ ]
to keep the user from screwing it up. So, what would be the most effective/elegant way of doing this? Thanks!
Edit
Looks like most came up with the same simple solution. Have to give it the first. Thanks everyone!