prova quando leggi

html_entity_decode($var);

quando inserisci nel db

$var= htmlentities("$var", ENT_QUOTES);