Hello, XYplorer community!
I would like to write a text in a simple .txt-file using writefile(); .
The text contains a sequence of a letter and one concatination mark, something like this: d" .
How can I do this?
Single quotation mark in a text
Re: Single quotation mark in a text
Wrap it in single quotes. eg.
Code: Select all
writefile("test.txt", 'd" .');
Re: Single quotation mark in a text
Thank you, jupe!
It works!
It works!
Last edited by zakhar on 04 May 2018 01:45, edited 1 time in total.
Re: Single quotation mark in a text
You didn't mention there was multiple lines, in that case the easiest way is like this
This is called a heredoc, you can paste the following into the XY address bar for more information if you are interested:
Code: Select all
$data = <<<>>>
aaa
d".
bbb
>>>;
writefile("<curpath>\TXT.txt", $data);
This is called a heredoc, you can paste the following into the XY address bar for more information if you are interested:
Code: Select all
::help "idh_scripting.htm#idh_scripting_heredoc";
Re: Single quotation mark in a text
Yes, thank you, jupe, one more time!