<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[再谈PHP单引号和双引号区别：php单引号和双引号的区别 ]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sat, 09 Jul 2011 15:22:04 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp; 单引号和双引号的区别和效率问题，但还是很多朋友包括本人了解的不是很清楚，一直以为PHP中单引号和双引号是互通的，到有一天，发现单引号和双引号出现错误的时候才去学习研究。所以今天再拿出来谈谈他们的区别，希望大家不要再为此困惑。<br/>” ” 双引号里面的字段会经过编译器解释，然后再当作HTML代码输出。<br/>‘ ‘ 单引号里面的不进行解释，直接输出。<br/>从字面意思上就可以看出，单引号比双引号要快了。<br/>例如：<br/>$abc=’my name is tome’;<br/>echo $abc //结果是:my name is tom<br/>echo ‘$abc’ //结果是:$abc<br/>echo “$abc” //结果是:my name is tom<br/>特别在使用MYSQL语句的时候，双引号和单引号的用法让新手不知所措，在这里，举个例子，来进行说明。<br/>假设查询条件中使用的是常量，例如：<br/>select * from abc_table where user_name=’abc’;<br/>SQL语句可以写成:<br/>SQLstr = “select * from abc_table where user _name= ‘abc’” ;<br/>假设查询条件中使用的是变量，例如：<br/>$user_name = $_REQUEST[&#039;user_name&#039;]; //字符串变量<br/>或<br/>$user=array (”name”=&gt; $_REQUEST[&#039;user_name‘,&quot;age&quot;=&gt;$_REQUEST[&#039;age&#039;];//数组变量<br/>SQL语句就可以写成：<br/>SQLstr = “select * from abc_table where user_name = ‘ ” . $user_name . ” ‘ “;<br/>SQLstr = “select * from abc_table where user_name = ‘ ” . $user[&quot;name&quot;] . ” ‘ “;<br/>对比一下:<br/>SQLstr=”select * from abc_table where user_name = ‘ abc ‘ ” ;<br/>SQLstr=”select * from abc_table where user_name =’ ” . $user _name . ” ‘ “;<br/>SQLstr=”select * from abc_table where user_name =’ ” . $user[&quot;name&quot;] . ” ‘ “;<br/>SQLstr可以分解为以下3个部分:<br/>1：”select * from table where user_name = ‘ ” //固定SQL语句<br/>2：$user //变量<br/>3：” ‘ ”<br/>1,2,3部分字符串之间用”.” 来连接!<br/>在百度文库上整了一下保存下来，可以下载阅读下：<br/><a href="attachment.php?fid=171">点击这里下载文件</a><br/><br/>再就是参看下：http://www.laruence.com/2008/08/19/338.html ，<br/>从编译原理上来大体了解下其较为深入的解释。<br/><br/>百度文库：http://wenku.baidu.com/view/3e6a238271fe910ef12df806.html
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 再谈PHP单引号和双引号区别：php单引号和双引号的区别 ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>