Jump to content

echoing Solé and getting Sol�


opel2010

Recommended Posts

Hi all,

my first post - so hope this makes sense and you guys can help,

 

I am using wordpress to store information and then run mysql select queries to extract data and display on certain webpages,

 

One of the titles of a post includes the character:  é

 

when I extract this from the database and echo it all I get is:  �

 

Qustion:  How do I get this to echo é and not � ?

 

thanks,

opel

no joy I'm afraid,

 

when I view in PhpMyAdmin, I can see 'Solé' so I guessing its something to do with me extracting into a string and then later echoing that string?

 

$conn = @mysql_connect("1.1.1.1", "user", "pass")
	or die(mysql_error());
mysql_select_db("picweb",$conn) or die(mysql_error());
$sql = "SELECT wp_posts2.* FROM `wp_posts2`, `wp_term_relationships` WHERE (`wp_posts2`.`id` = `wp_term_relationships`.`object_id`)  AND `term_taxonomy_id` =99 AND `post_status` = 'publish' ORDER BY `id` DESC";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($show_results = mysql_fetch_array($result)) {

$ID = $show_results['ID'];
$Resort = null;
$Resort = $show_results['post_title'];

echo $Resort;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.