benedictbutlin
Technical User
i have 2 arrays 'my_names' and 'my_values'
my_names: Array
(
[0] => apple
[1] => peach
[2] => pear
[3] => banana
)
my_values: Array
(
[0] => red
[1] => pink
[2] => green
[3] => yellow
)
how would i merge them so values from 'my_name" become the keys for 'my_values', like so...
Array
(
[apple] => red
[peach] => pink
[pear] => green
[banana] => yellow
)
cheers!
my_names: Array
(
[0] => apple
[1] => peach
[2] => pear
[3] => banana
)
my_values: Array
(
[0] => red
[1] => pink
[2] => green
[3] => yellow
)
how would i merge them so values from 'my_name" become the keys for 'my_values', like so...
Array
(
[apple] => red
[peach] => pink
[pear] => green
[banana] => yellow
)
cheers!