I have the following array:
$users = array(
array(
'id' => 17,
'name' => 'Miguel'
),
array(
'id' => 23,
'name' => 'Vera'
),
array(
'id' => 39,
'name' => 'Sara'
)
);
My question is: can you edit (add / edit / delete) the values of one of the arrays based on one of their values without using for/foreach/while
?
For example: I would like to add a key / value to the array whose id is 23, so that it is:
...
array(
'id' => 23,
'name' => 'Vera',
'loggedin' => true
),
...
I took a look at here and in the functions that speak but do not think (at least I could not implement) that is any of them.