How to convert Post Object Custom Field into Tags

Assuming the $value actually returns a post’s ID. Replace the code

wp_add_post_tags( $post_id, $value );

With

wp_add_post_tags( $post_id, sanitize_title( get_the_title( $value[0] ) ) );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)