I'm developing comments sections for my user profile and I'm giving an option to user to make comment visible or not.
I've created an array:
$comment = array($comment_name, $comment_text, $time, $visible);
Where $visible is false value at default. And then I add_user_meta
add_user_meta($user->ID, 'recommend_comment', $comment);
This is working perfect for me, I've got an array of comments displayed. Now I want to update array with $visible = true if user clicks on button but not sure how to access specific array row with update_user_meta. I tried with:
update_user_meta($user->ID, 'recommend_comment', $prikazi, [2]);
But that's not working. Any idea how to make this?