定义
$a="aaa";
$a='aaa'; 都是定义 无区别
输出
$test = "iwind";
$str = "i love $test";
$str1 = 'i love $test'; www.phperz.com
echo $str; //将得到 i love iwind
echo $str1; //将得到 i love $test 单引不输出变量
echo 比 print 快
echo一次可输出多个字符串,而print则不可以:
echo "i ","love ","iwind"; // 将输出 "i love iwind" phperz.com
print "i ","love ","iwind"; // 将提示错误
strlen() 汉字算2个
mb_strlen($str, "GBK"); 算1个 同ASP len()
trim 双去
ltrim 左去
rtim 右去
JOIN(“字符”,数组);