PHP: htmlentities not working with variable

ClaidaBak

New Member
I'm using htmlentities() to convert characters like ? and ? to its character codes. I'm getting the texts from the MYSQL database.\[code\]while($row = mysql_fetch_array($array, MYSQL_NUM)){ echo "<div style='float:left; margin-right:40px;'> <div style='width:148px; height:141px; background-image:url(uploads/".$row[0].")'> <img src='http://stackoverflow.com/questions/3882867/images/glasscase.png' alt=''/> </div> <font style='font-size:20px'>".htmlentities($row[1], ENT_QUOTES,"UTF-8")."</font> <br/> <font style='font-size:14px'>".htmlentities($row[2], ENT_QUOTES, "UTF-8")."</font></div>";}\[/code\]However $row[2] is returning an empty string when using htmlentities(). Does anyone knows what's wrong?Thanks!
 
Back
Top