Q:

Unable to execute php function in wordpress as meta contains apostrophe

I want to use the function below to display the fiance's name of the current user but i am unable to do this due to the apostrophe in Fiance's as the code stop working from the apostrophe onwards.
Please help on how i can get round this.
<?php 
  $user_id = get_current_user_id(); 
  $key = 'Fiance's Name';
  $single = true; 
  $user_last = get_user_meta( $user_id, $key, $single ); 
  echo $user_last; 
 ?>

A:

Use double quotes here: $key = "Fiance's Name";

