Do ECHO and PRINT automatically escape single quotes?
<p>I'm just working my way through PHP from ASP, so seeing a few irregular things happening (irregular to me only of course).</p>

<p>I have a search textbox, when somebody makes a search I'd like to keep the current search term in the textbox. I have done this by storing the term in a SESSION and echoing it in the textbox value.</p>

<pre><code>&lt;input type="text" value="&lt;? echo $_SESSION['search_str'] ?&gt;"&gt;
</code></pre>

<p>Which works okay but if I search for something with an apostrophe, the apostrophe has automatically become escaped and is now showing in the textbox with a slash and apostrophe.</p>

<p>Before I go and un-escape the string, which I never escaped, is this how it's meant to be or have I missed something somewhere.</p>
