title: Parsing xml with PHP what to do with characters like these
body: <p>I'm parsing an xml document using php.</p>
  
  <p>When I see the result in my browser I get the following characters: </p>
  
  <p>Ã± instead of spanish ñ </p>
  
  <p>Ã­ instead of í</p>
  
  <p>ÃƒÂ¡ instead of á</p>
  
  <p>Ã³ instead of ó</p>
  
  <p>Ã© instead of é</p>
  
  <p>I was going to use a str_replace and replace every odd character for the good ones, but sadly the pattern before happens only sometimes and in general I have a wide collection of odd characters :( </p>
  
  <p>The xml heading is: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
  </code></pre>
  
  <p>But if I change it to utf-8 it simply won't be printed .. </p>
  
  <p>I load the xml as a string with simplexml_load_string (comes from database like that)</p>
  
  <p>Can you please give me any ideas on how to solve this? </p>
  
  <p>Thanks a lot</p>