0

i am using html_entity_decode($str) for decode html tags, but it cannot be able to decode the text. it show ? for " " in output... i have used htmlentities also to encode it and at display time i decode it also. but the problem is not solve.you can watch the output at 'http://www.aspits.com/aspits/testimonials.php'. i am suffering from this please help me. i have tried so much things for it but i am not be able to get the solution for this. in database it appear correct means in database the entry is "test" but when i show it on front end then it display ?test? like this as output...

1 Answer 1

1

Do your character sets in database and HTML match?

If not, make them. Assuming you are using UTF-8.

<meta http-equiv="Content-Type" content=text/html; charset=utf-8" />

I'll also assume MySQL (please tag what database you are using).

SET NAMES 'utf-8'

Update

Just looked at your site. You are informing the browser you are using UTF-8.

Please check your database.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks for your response... i am using mysql as database and i use the meta tag as you show me but what you want to tell me i can't able to understand what you want to say . what is means of SET NAMES 'utf-8' where should i use this and why... please tell me
@Abhishek You should run that query. e.g. mysql_query('SET NAMES \'utf-8\'').

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.