I need to write this string in a text file : " <?xml version="1.0"?> " I cannot do this using fwrite() because of the " I guess. Is there a trick for doing this ?
In advance, thank you.
use \" insetad of " or do this echo "bla bla 'bla' bla"; or echo 'bla bla "bla" bla'; or echo "bla bla \"bla\" bla";
You can print quotes, provided they are escaped by a slash.
fwrite($filepointer,"I want\"this\" in quotes"); works fine. Just try it and see what happens. You may have to play around with addslashes().