常用字符串函数(一)_PHP
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 12:32:07
Original
896 people have browsed it
常用字符串函数(一)
$first = "abc";
$second = "aBc";
if(strcmp($first, $second) == 0)//字串比较
{
print("字符串相等:"."
");
}
else
{
print("字符串不相等"."
");
}
?>
print("a short string ".strlen("a short string")."
");//字串长度
?>
$text = "hello world";
print(strpos($text, "w")."
");//寻找字串中某字元最先出现处
?>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-24 12:36:12
-
2025-02-24 12:11:09
-
2025-02-24 12:06:10
-
2025-02-24 12:04:13
-
2025-02-24 12:03:10
-
2025-02-24 12:02:09
-
2025-02-24 12:01:10
-
2025-02-24 12:00:16
-
2025-02-24 11:59:10
-
2025-02-24 11:58:14