I would like to have a function that takes an array as input and changes some values of the array (in my case the array is $_SESSION but I think it does not really maters).
The coding is like:-
$_SESSION['index_1'] = 'value 1'; $_SESSION['index_2'] = 'value 2';
If you want to change the value for the index "index_2" to value "value 2 changed", then you just simply write:-
index_2
value 2 changed
$_SESSION['index_2'] = 'value 2 changed';
Hope it helps.