Q:

Replace " with \" with Doctrine 1.2

Here is my problem.
I get data from database using Doctrine 1.2 and put the data in a Textbox.
The data is 19" x 12" to put in the Textbox 
Here is the result:
<input type="text" value="19" x 12"" />

I  think I need to escape all the " with \"
My question is :
How can I perform this automaticly without going into all my script and make a str_replace() ?
Thanks everyone.

A:

I would just use htmlentities
$string = htmlentities($text_with_quotes, ENT_QUOTES);
echo '<input type="text" value="' . $string . '">';

Should give you what  you need.

