Friday 06 February 2004 1:14:26 am
Hi, I'm not sure in which context this problem of yours relates to, if it is related to template code then perhaps the following lines shed some light on the issue: It is possible to use quotes inside strings. This can be done in two ways:
-by using a different kind of quote -by using an escape character In other words, if you need to use a quote inside a string, you can either switch to the other enclosing quote type, or escape the quote character with a backslash. The following examples demonstrate the use of quotes inside strings:
{'The following text is double quoted: "Rock and roll!" '}
{"The following text is single quoted: 'Rock and roll!' "}
{'Using both single and double quotes: "Rock\'n roll!" '}
{'Using both single and double quotes: \'Rock\'n roll!\' '}
{"Using both single and double quotes: 'Rock'n roll!' "}
{"Using both single and double quotes: \"Rock'n roll\" "}
The output of the template code above will be:
The following text is double quoted: "Rock and roll!"
The following text is single quoted: 'Rock and roll!'
Using both single and double quotes: "Rock'n roll!"
Using both single and double quotes: 'Rock'n roll!'
Using both single and double quotes: 'Rock'n roll!' Using both single and double quotes: "Rock'n roll!" Because of the way template code is defined (template code is encapsulated in a matching pair of curly brackets), the right curly bracket, "}", must also be prepended by the backslash escape character. The following example demonstrates this:
{'{ This text is inside curly brackets.\}'}
The output of the template code above will be: {This text is inside curly brackets.} Balazs
|