PHP Always Replace Apostrophe With Back-Slash Apostrophe
<p>I have this simple PHP variable :</p>

<pre><code>$Title = $_POST['text'];
</code></pre>

<p>and when it has this input : <code>here's the text</code> </p>

<p>the PHP will recognize as this when it written to a file : <code>here\'s the text</code></p>

<pre><code>$Filename = 'index.php';
$Handle = fopen($Filename, "r");
$Contents = fread($Handle, filesize($Filename));
fclose($Handle);

$TitleTag = extractor($Contents, "&lt;title&gt;", "&lt;/title&gt;");

$Contents = str_replace ($TitleTag, $Title, $Contents); 
$Handle = fopen($Filename, 'w+');
fwrite($Handle, $Contents);
fclose($Handle);
</code></pre>

<p>how to get exactly just like what user typed? thanks</p>
