-1

I am storing a data like this

“Com­mu­ni­ca­tion is often the har­dest part of leadership.”

gaping­void crea­tes ideas and ima­ges SPECIFICALLY for lea­ders: uni­que and crea­tive pre­sen­ta­tion decks, ani­ma­tions and other visual props that help deli­ver mes­sa­ges in unex­pec­ted, memo­ra­ble and more mea­ning­ful ways. These visuals are not only desig­ned to delight and disarm your audience, they’re desig­ned make you and your mes­sage sing, win­ning your audience over, making them want to talk about you and your vision for months to come.

i have used nl2br to retrive the data from database it's displaying the data as i entered bt the issue is observe these examples they’re and memo-­ra­-ble it is displaying as they?re and memo?ra?ble please help in rectifying it.

1 Answers1

1

Add a meta charset tag in html header and sent it to utf-8

<meta charset="utf-8">

and run this before running your query

mysqli_query($con,"SET NAMES 'utf8'"); //am assuming you are using mysqli

<?php echo nl2br($row_show_shared_info["description"]);?>

it should fix it.

Saqueib
  • 3,484
  • 3
  • 33
  • 56
  • can you post the code, how you are displaying it from db – Saqueib Jan 23 '15 at 08:22
  • �Communication is often the hardest part of leadership.� gaping void creates ideas and images SPECIFICALLY for leaders: unique and creative presentation decks, animations and other visual props that help deliver messages in unexpected, memorable and more meaningful ways. These visuals are not only designed to delight and disarm your audience, they�re desig�ned make you and your message sing, winning your audience over, making them want to talk about you and your vision for months to come. – chandrasekhar Jan 23 '15 at 08:26
  • before communication ? is start of " and ? after leadership is end of " ? at they?re is to be printed as they're and desig?ned as desig-ned. – chandrasekhar Jan 23 '15 at 08:27
  • and one more thing can i restrcit it to print just 4 lines of the data and remaining after clicking on the data i want to display it in other form. – chandrasekhar Jan 23 '15 at 08:33
  • you should do it using jquery, don't run one more query for same thing, [see this](http://stackoverflow.com/questions/5270227/how-to-hide-show-more-text-within-a-certain-length-like-youtube) – Saqueib Jan 23 '15 at 08:37