I have stored some mathematics questions in the mysql database having UTF-8 columns as below:
htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
which stores the question in database as:
log<sub>2</sub>(log<sub>5</sub>625)का मान ज्ञात करें ?
Now, I call this question from database to frontend as below:
htmlspecialchars_decode($quest, ENT_QUOTES)
which shows the following output:
log<sub>2</sub>(log<sub>5</sub>625)का मान ज्ञात करें ?
while the output should be
log2(log5625)का मान ज्ञात करें ?
How to resolve this? What I am missing?
try this:
html_entity_decode(htmlspecialchars_decode($quest,ENT_QUOTES))
and problem will be solved for sure.