I have a array
with multiple objects :
array(3) {
[0]=>
object(stdClass)#5750 (2) {
["value"]=>
string(16) "[email protected]"
["key"]=>
string(18) "email_client"
}
[1]=>
object(stdClass)#5254 (2) {
["value"]=>
string(20) "gold"
["key"]=>
string(19) "package"
}
[2]=>
object(stdClass)#6074 (2) {
["value"]=>
string(5) "senh4"
["key"]=>
string(18) "password"
}
}
And I need you to stay:
array = {
email_client => [email protected],
package => gold,
password => senha
}
I tried with foreach
but it does not access the objects. With array_walk_recursive
the answer is the same. Can someone help me?