随笔分类 -  PHP函数

分享PHP中的函数
摘要:strtoupper () 函数把所有字符转换为大写。 strtoupper( string $str ) : string 参数描述 str必需。规定要转换的字符串。 返回值: 返回把字符串中所有字符转换为大写。 实例: echo strtoupper("hello world"); //HELL 阅读全文
posted @ 2021-01-21 12:54 梦中程序员 阅读(29) 评论(0) 推荐(0)
摘要:substr 函数返回字符串的一部分。注释:如果 start 参数是负数且 length 小于或等于 start,则 length 为 0。 string substr (string $string , int $start [, int $length ]) 参数描述 string 输入字符串。 阅读全文
posted @ 2021-01-19 08:39 梦中程序员 阅读(113) 评论(0) 推荐(0)
摘要:strstr() 查找字符串的首次出现。 string strstr ( string $haystack, mixed $needle[, bool $before_needle=false]) 说明:返回 haystack 字符串从 needle 第一次出现的位置开始到 haystack 结尾的 阅读全文
posted @ 2021-01-18 08:32 梦中程序员 阅读(74) 评论(0) 推荐(0)
摘要:implode() 将一个一维数组的值转化为字符串。 string implode ( string $glue , array $pieces ) 参数描述 glue 默认为空的字符串。 pieces 你想要转换的数组。返回值:返回一个字符串,其内容为由 glue 分割开的数组的值。 实例: <? 阅读全文
posted @ 2021-01-09 16:46 梦中程序员 阅读(54) 评论(0) 推荐(0)