<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>最优良人 &#187; 字符串</title>
	<atom:link href="http://www.zui88.com/view-tag/%e5%ad%97%e7%ac%a6%e4%b8%b2/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zui88.com/blog</link>
	<description>中山php&#124;最优网络</description>
	<lastBuildDate>Mon, 13 May 2013 04:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>php反斜线引用字符串</title>
		<link>http://www.zui88.com/blog/view-114.html</link>
		<comments>http://www.zui88.com/blog/view-114.html#comments</comments>
		<pubDate>Sun, 14 Aug 2011 17:09:38 +0000</pubDate>
		<dc:creator>lin</dc:creator>
				<category><![CDATA[后端程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[字符串]]></category>

		<guid isPermaLink="false">http://www.zui88.com/blog/?p=114</guid>
		<description><![CDATA[addslashes:使用反斜线引用字符串 ，返回字符串，该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线，这些字符是单引号（'）、双引号（"）、反斜线（\）与 NUL（NULL 字符）。 stripslashes 相反的操作,或者如果系统自动开启了魔法引号（默认是开启的），如果想得到原来没被转义过的字符串，可以使用此函数 比如在正则的逆向引用中： $find[] = "/&#60;a(.*)href=(\"&#124;')?(\/.*)(\"&#124;'&#124;\s)/Uei"; $replace[] ="stripslashes(str_replace('$','$@&#38;#','$0'));"; 去掉php自动加上的反斜杠]]></description>
			<content:encoded><![CDATA[<div style="line-height: 25px;">
<p>addslashes:使用反斜线引用字符串 ，返回字符串，该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线，这些字符是单引号（'）、双引号（"）、反斜线（\）与 NUL（NULL 字符）。</p>
<p>stripslashes 相反的操作,或者如果系统自动开启了魔法引号（默认是开启的），如果想得到原来没被转义过的字符串，可以使用此函数</p>
<p>比如在正则的逆向引用中：<br />
$find[] = "/&lt;a(.*)href=(\"|')?(\/.*)(\"|'|\s)/Uei";<br />
$replace[] ="stripslashes(str_replace('$','$@&amp;#','$0'));";<br />
去掉php自动加上的反斜杠</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zui88.com/blog/view-114.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>判断一个数组里是否都是空字符串</title>
		<link>http://www.zui88.com/blog/view-74.html</link>
		<comments>http://www.zui88.com/blog/view-74.html#comments</comments>
		<pubDate>Sat, 13 Aug 2011 17:10:57 +0000</pubDate>
		<dc:creator>lin</dc:creator>
				<category><![CDATA[后端程序]]></category>
		<category><![CDATA[字符串]]></category>
		<category><![CDATA[数组]]></category>

		<guid isPermaLink="false">http://www.zui88.com/blog/?p=74</guid>
		<description><![CDATA[有时我们要把一个全为空字符串组成的数组如：array('','','');当成是空对待，因为里面不含任何数据 使用empty()显然是不行的，因为里面包含了三个值，只是这些值都是空字符串，用count()也不可以 那么可以用一种变通的方式，先把数组用implode转换成字符串，再判断字符串是否为真就可以了： $a=array('',''); $a = implode('',$a);i f($a)'为真'; else echo '为假';]]></description>
			<content:encoded><![CDATA[<div style="line-height: 25px;">
<p>有时我们要把一个全为空字符串组成的数组如：array('','','');当成是空对待，因为里面不含任何数据</p>
<p>使用empty()显然是不行的，因为里面包含了三个值，只是这些值都是空字符串，用count()也不可以</p>
<p>那么可以用一种变通的方式，先把数组用implode转换成字符串，再判断字符串是否为真就可以了：</p>
<p>$a=array('','');</p>
<p>$a = implode('',$a);i</p>
<p>f($a)'为真';</p>
<p>else echo '为假';</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zui88.com/blog/view-74.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>php字符串首字母转换大小写</title>
		<link>http://www.zui88.com/blog/view-48.html</link>
		<comments>http://www.zui88.com/blog/view-48.html#comments</comments>
		<pubDate>Sat, 13 Aug 2011 10:04:36 +0000</pubDate>
		<dc:creator>lin</dc:creator>
				<category><![CDATA[后端程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[字符串]]></category>

		<guid isPermaLink="false">http://www.zui88.com/blog/?p=48</guid>
		<description><![CDATA[首字母变大写：ucwords() &#60;?php $foo = 'hello world!'; $foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!'; $bar = ucwords($bar); // HELLO WORLD! $bar = ucwords(strtolower($bar)); // Hello World! ?&#62; 第一个词首字母变大写：ucfirst() &#60;?php $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // [...]]]></description>
			<content:encoded><![CDATA[<p>首字母变大写：<strong>ucwords()</strong></p>
<div><code>&lt;?php<br />
$foo = 'hello world!';<br />
$foo = ucwords($foo);             // Hello World!</p>
<p>$bar = 'HELLO WORLD!';<br />
$bar = ucwords($bar);             // HELLO WORLD!<br />
$bar = ucwords(strtolower($bar)); // Hello World!<br />
?&gt; </code></div>
<p>第一个词首字母变大写：<strong>ucfirst()</strong></p>
<div><code>&lt;?php<br />
$foo = 'hello world!';<br />
$foo = ucfirst($foo);             // Hello world!</p>
<p>$bar = 'HELLO WORLD!';<br />
$bar = ucfirst($bar);             // HELLO WORLD!<br />
$bar = ucfirst(strtolower($bar)); // Hello world!<br />
?&gt; </code></div>
<p>第一个词首字母小写<strong>lcfirst()</strong></p>
<p><code>&lt;?php<br />
$foo = 'HelloWorld';<br />
$foo = lcfirst($foo);             // helloWorld</p>
<p>$bar = 'HELLO WORLD!';<br />
$bar = lcfirst($bar);             // hELLO WORLD!<br />
$bar = lcfirst(strtoupper($bar)); // hELLO WORLD!<br />
?&gt; </code></p>
<p>字母变大写：<strong>strtoupper()</strong></p>
<p>字母变小写：<strong>strtolower()</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zui88.com/blog/view-48.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
