0

Ok so I have a Wordpress blog on one page but my front page is not wordpress. I'm pulling a post title and displaying it on the front page like so...

$result=mysql_query("SELECT * FROM wp_posts WHERE post_status = 'publish' ORDER BY post_date DESC LIMIT 1");
while($row=mysql_fetch_array($result)) {
    $entry_new = $row['post_title'];
}

But the issue is, when something with quotations comes it up gives the diamond with the question mark. I know it has to be an encoding issue, but if I change the page charset it ISO it breaks the javascript. any ideas?

here's the link... www.dudnyk.com

Greg Thompson
  • 886
  • 4
  • 12
  • 31

1 Answers1

0

You could remove the special characters (non UTF-8) from the returned strings. Regular expressions would be the way to go; this will probably help you.

P.S., those quotes are probably magic quotes, or quotations copied from MSWord.

Community
  • 1
  • 1
wanovak
  • 6,117
  • 25
  • 32