Convert \' into "

Hi

I am creating a web xml generator for RSS using Flash. All the job is done by flash except the file generator that is in PHP.

my problem is that PHP converts ’ into ’ and when the generated file is executed it gives an error because of '.

Is there some way to convert all ’ inside a String into this " or this ’ ?

Can someone give me a hint?

my actual PHP code to generate a xml is


<?php
$xml			= $_POST["senderxml"];
$directory 		= $_POST["senderdirectory"];;
$xmlFileName	= $_POST["senderfilename"];

// cria o XML
try{
$fp = fopen($directory.'/'.$xmlFileName, 'w');
fwrite ($fp, $xml);
fclose($fp);
echo "retval=1";
} catch (Exception $e) {
echo "retval=0";
}

?>