Maybe you meant:
if($current_user->ID == $attachment->post_author) echo " Matched!! ";
PS: By unexpected results I think you are referring to the ‘DISEASES OF THE PENIS’ part… right?
Maybe you meant:
if($current_user->ID == $attachment->post_author) echo " Matched!! ";
PS: By unexpected results I think you are referring to the ‘DISEASES OF THE PENIS’ part… right?