来源:http://blog.csdn.net/irxiang/article/details/50164945 最近在使用javascript编程,遇到使用字符串的情况 写了一点测试代码 var str = 'This is Jack'; var str2 = "This is Tom"; var str3 = 'This is "Rose"'; var str4 = "This is 'LiLi'"; var str5 = "Thi…
1.定义字符串 定义字符串时,只有一种引号被视为定义符,即单引号或双引号.于是,如果一个字符串由双引号开始,那么只有双引号被分析器解析.这样,你就可以在双引号串中包含任何其他字符,甚至单引号.下面的引号串都是合法的 $s = "I am a 'single quote string' inside a double quote string"; $s = 'I am a "double quote string" inside a single quotePHP字符…