This is new for me(and arrays are not my kind of thing), but not sure if this is possible as I could not find anything examples online but I have 2 arrays with data, and these arrays contain a value called 'slug', which have to merge/combined(category/product). These slugs need to match with the value called 'language' so that we can build a new array with these new values.
// first array:
Array(
[0] => Array
(
[category_id] => 5
[attribute] => slug
[language] => de
[translation] => blanko
)
[1] => Array
(
[category_id] => 5
[attribute] => slug
[language] => en
[translation] => white
)
[2] => Array
(
[category_id] => 5
[attribute] => slug
[language] => es
[translation] => blanco
)
[3] => Array
(
[category_id] => 5
[attribute] => slug
[language] => fr
[translation] => vierges
)
[4] => Array
(
[category_id] => 5
[attribute] => slug
[language] => it
[translation] => bianche
)
)
// second array:
Array(
[0] => Array
(
[product_id] => 5
[attribute] => slug
[language] => de
[translation] => ettiketten-xxx
)
[1] => Array
(
[product_id] => 5
[attribute] => slug
[language] => en
[translation] => labels-xxxx
)
[2] => Array
(
[product_id] => 5
[attribute] => slug
[language] => es
[translation] => etiquetas-xxxx
)
[3] => Array
(
[product_id] => 5
[attribute] => slug
[language] => fr
[translation] => etiquettes-xxx
)
[4] => Array
(
[product_id] => 5
[attribute] => slug
[language] => it
[translation] => etichette-xxxx
)
)
I want to make a new array like
array(
'de' => 'blanko/ettiketten-xxx',
'fr' => 'vierges/etiquettes-xxx'
// and so on
)