I have an array and I want to add value of one key of that array to another key of same array. This is my code
$current_user = $current_user->user_name;
$_SESSION['user_name'] = $current_user;
Now I want to use this $_SESSION['user_name'] and add this value to another key of same array $_SESSION['_PREFERENCES']. This key has values in it. I want something like this
$_SESSION['(value of user_name key)_PREFERENCES']
Please guide me how to do it? Thank you.