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

Link to comment
Share on other sites

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;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.