# Convert \\' into "

**URL:** <https://forum.kirupa.com/t/convert-into/284279>\
**Category:** programming\
**Created:** [March 17, 2009, 2:57pm UTC](https://forum.kirupa.com/t/convert-into/284279 "2009-03-17T14:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [March 17, 2009, 2:57pm UTC](https://forum.kirupa.com/t/convert-into/284279/1 "2009-03-17T14:57:21Z")

</div>

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

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

?>

```
