摘要:
"); //小写字串 print("小写: ".strtolower("Hello World").""); //大写字串 print("大写: ".strtoupper("Hello World").""); //去空格 $text = " whitespace "; print("\"" . trim($text... 阅读全文
摘要:
");//取出子串 //切开字串 // create a demo string $line = "leon\tatkinson\tleon@clearink.com"; // loop while there are still tokens for($token = strtok($line, "\t"); $token != ""... 阅读全文
摘要:
"); } else { print("字符串不相等".""); } print("abcde我是中国人: ".strlen("abcde我是中国人")."");//字串长度 $text = "hello world"; print(strpos($text, "w")."");//寻找字串中某字元最先出现处 ?> ... 阅读全文
摘要:
");//数组的个数 print("数组的当前值:".current($colors)."");//当前的值 end($colors); print("数组的最后一个的值:".current($colors).""); print(""); $slice = each($colors);// print("each()函数的使用:".""); ... 阅读全文
摘要:
"Yobert", "steve" => "Btephen", "jon" => "Aonathon"); /*循环输出 reset() 函数将内部指针指向数组中的第一个元素,并输出。 相关的方法: current() - 返回数组中的当前元素的值,而 key() 函数返回的是元素的键名。 end() - 将内部... 阅读全文
