<font face="courier new, courier, mono" color="#0000ff" size="3"> <hr> <br><br><title>常用字符串函数(一)</title> <br><br><br><br> $first = "abc";<br> $second = "aBc";<br> if(strcmp($first, $second) == 0)//字串比较<br> {<br> print("字符串相等:"."<hr>");<br> }<br> else<br> {<br> print("字符串不相等"."<hr>");<br> }<br>?><br><br> print("a short string ".strlen("a short string")."<hr>");//字串长度<br>?><br><br> $text = "hello world";<br> print(strpos($text, "w")."<hr>");//寻找字串中某字元最先出现处<br>?><br><br> <hr> <img alt="常用字符串函数" hspace="0" src="http://img.bitscn.com/upimg/php/20070123/11E54b3303015W8.jpg" align="baseline" border="0"></font>