when I have a value like this in the database (\"foo\")
how can I echo it without any conflict with html code
notice
You can use htmlentities to overcome this problem like so:
" />
this will return
avoiding any conflict with html.