php常用函数
来源:互联网 发布:药品数据 编辑:程序博客网 时间:2024/06/04 01:19
explodeimplode数组类in_array -- 检查数组中是否存在某个值array -- 新建一个数组 count -- 计算数组中的单元数目或对象中的属性个数range -- 建立一个包含指定范围单元的数组array_key_exists -- 检查给定的键名或索引是否存在于数组中array_keys -- 返回数组中所有的键名array_map -- 将回调函数作用到给定数组的单元上 array_merge_recursive -- 递归地合并一个或多个数组array_merge -- 合并一个或多个数组array_pushmysqlmysql_connectmysql_querymysql_select_db -- 选择 MySQL 数据库mysql_close -- 关闭 MySQL 连接mysql_fetch_array -- 从结果集中取得一行作为关联数组,或数字数组,或二者兼有 mysql_fetch_assoc -- 从结果集中取得一行作为关联数组 mysql_fetch_field -- 从结果集中取得列信息并作为对象返回 mysql_fetch_lengths -- 取得结果集中每个输出的长度 mysql_fetch_object -- 从结果集中取得一行作为对象mysql_fetch_row -- 从结果集中取得一行作为枚举数组REGpreg_match_all -- 进行全局正则表达式匹配preg_match -- 进行正则表达式匹配preg_quote -- 转义正则表达式字符preg_replace_callback -- 用回调函数执行正则表达式的搜索和替换preg_replace -- 执行正则表达式的搜索和替换preg_split -- 用正则表达式分割字符串ereg_replace -- 正则表达式替换ereg -- 正则表达式匹配eregi_replace -- 不区分大小写的正则表达式替换eregi -- 不区分大小写的正则表达式匹配split -- 用正则表达式将字符串分割到数组中spliti -- 用正则表达式不区分大小写将字符串分割到数组中sql_regcase -- 产生用于不区分大小的匹配的正则表达式字符串str_getcsv -- Parse a CSV string into an array str_ireplace -- Case-insensitive version of str_replace(). str_pad -- Pad a string to a certain length with another string str_repeat -- Repeat a stringstr_replace -- Replace all occurrences of the search string with the replacement string str_rot13 -- Perform the rot13 transform on a stringstr_shuffle -- Randomly shuffles a stringstr_split -- Convert a string to an array str_word_count -- Return information about words used in a string strcasecmp -- Binary safe case-insensitive string comparison strchr -- 别名 strstr()strcmp -- Binary safe string comparisonstrcoll -- Locale based string comparisonstrcspn -- Find length of initial segment not matching mask strip_tags -- Strip HTML and PHP tags from a stringstripcslashes -- Un-quote string quoted with addcslashes() stripos -- Find position of first occurrence of a case-insensitive string stripslashes -- Un-quote string quoted with addslashes() stristr -- Case-insensitive strstr() strlen -- Get string lengthstrnatcasecmp -- Case insensitive string comparisons using a "natural order" algorithm strnatcmp -- String comparisons using a "natural order" algorithm strncasecmp -- Binary safe case-insensitive string comparison of the first n characters strncmp -- Binary safe string comparison of the first n characters strpbrk -- Search a string for any of a set of characters strpos -- Find position of first occurrence of a string strrchr -- Find the last occurrence of a character in a string strrev -- Reverse a stringstrripos -- Find position of last occurrence of a case-insensitive string in a string strrpos -- Find position of last occurrence of a char in a string strspn -- Find length of initial segment matching mask strstr -- Find first occurrence of a stringstrtok -- Tokenize stringstrtolower -- Make a string lowercasestrtoupper -- Make a string uppercasestrtr -- Translate certain characterssubstr_compare -- Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters substr_count -- Count the number of substring occurrencessubstr_replace -- Replace text within a portion of a stringsubstr -- Return part of a string