Sometimes i need to save quotes in a string.. like this :
this is a " test
Ok, i can do that.. when read the string and put it in a var like this :
$var = 'this is a " test'; (or $var = "this is a \" test"😉
The problem is when i try to put in a input text :
<input type="text" name="test" value="<? echo $var; ?>">
It just write in value : this is a
Cut because the quotes. If i change the " for ' then it works
<input type='text' name='test' value='<? echo $var; ?>'>
The problem is "solved" but what about if somebody whant to write a ' ? Or mixed
Ok.. how can make that quotes work in value whitout problems (is not a solution if i show on the screen : this is a \" test .. i only need to show the exact phrase)