php常用函数-(10)php字符串处理常用的函数

addcslashes — 以 C 语言风格使用反斜线转义字符串中的字符

addslashes — 使用反斜线引用字符串

bin2hex — 将二进制数据转换成十六进制表示

chop — rtrim() 的别名

chr — 返回指定的字符

chunk_split — 将字符串分割成小块

count_chars — 返回字符串所用字符的信息

crc32 — 计算一个字符串的 crc32 多项式

crypt — One-way string encryption (hashing)

echo — Output one or more strings

explode — 使用一个字符串分割另一个字符串

fprintf — Write a formatted string to a stream

get_html_translation_table — Returns the translation table used by htmlspecialchars() and htmlentities()

hebrev — Convert logical Hebrew text to visual text

hebrevc — Convert logical Hebrew text to visual text with newline conversion

html_entity_decode — Convert all HTML entities to their applicable characters

htmlentities — Convert all applicable characters to HTML entities

htmlspecialchars_decode — Convert special HTML entities back to characters

htmlspecialchars — Convert special characters to HTML entities

implode — Join array elements with a string

join — 别名 implode()

levenshtein — Calculate Levenshtein distance between two strings

localeconv — Get numeric formatting information

ltrim — Strip whitespace (or other characters) from the beginning of a string

md5_file — Calculates the md5 hash of a given file

md5 — Calculate the md5 hash of a string

metaphone — Calculate the metaphone key of a string

money_format — Formats a number as a currency string

nl_langinfo — Query language and locale information

nl2br — Inserts HTML line breaks before all newlines in a string

number_format — Format a number with grouped thousands

ord — Return ASCII value of character

parse_str — Parses the string into variables

print — Output a string

printf — Output a formatted string

quoted_printable_decode — Convert a quoted-printable string to an 8 bit string

quotemeta — Quote meta characters

rtrim — Strip whitespace (or other characters) from the end of a string

setlocale — Set locale information

sha1_file — Calculate the sha1 hash of a file

sha1 — Calculate the sha1 hash of a string

similar_text — Calculate the similarity between two strings

soundex — Calculate the soundex key of a string

sprintf — Return a formatted string

sscanf — Parses input from a string according to a format

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 string

str_replace — Replace all occurrences of the search string with the replacement string

str_rot13 — Perform the rot13 transform on a string

str_shuffle — Randomly shuffles a string

str_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 comparison

strcoll — Locale based string comparison

strcspn — Find length of initial segment not matching mask

strip_tags — Strip HTML and PHP tags from a string

stripcslashes — 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 length

strnatcasecmp — 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 string

strripos — 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 string

strtok — Tokenize string

strtolower — Make a string lowercase

strtoupper — Make a string uppercase

strtr — Translate certain characters

substr_compare — Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters

substr_count — Count the number of substring occurrences

substr_replace — Replace text within a portion of a string

substr — Return part of a string

trim — Strip whitespace (or other characters) from the beginning and end of a string

ucfirst — Make a string’s first character uppercase

ucwords — Uppercase the first character of each word in a string

vfprintf — Write a formatted string to a stream

vprintf — Output a formatted string

vsprintf — Return a formatted string

wordwrap — Wraps a string to a given number of characters using a string break character

010832918

本文来自投稿,不代表重蔚自留地立场,如若转载,请注明出处https://www.cwhello.com/540.html

如有侵犯您的合法权益请发邮件951076433@qq.com联系删除

(0)
重蔚的头像重蔚管理团队
上一篇 2015年12月7日 17:06
下一篇 2015年12月7日 17:14

相关推荐

  • PHP函数的数据可视化函数。

    PHP作为一种高性能、易学易用的服务器端脚本语言,功能十分强大。在开发过程中,经常需要对数据进行可视化,以便更好地展示和分析数据,这时就需要使用到PHP函数的数据可视化函数。数据可视化是指将复杂的数据经过…

    2023年5月22日
    02
  • PHP文件下载

    文件下载 如果下载的文件较多、文件大,通常就会使用百度云,如果下载的文件小、文件少的话,通常会使用php进行下载 通过php下载文件的原理: 先通过php读取下载的文件资源,读取到这些资源之后,再将其保存到文件…

    2018年9月18日
    0337
  • php实现签到功能的方法实例分析(附代码)

    本文实例讲述了php实现签到功能的方法。分享给大家供大家参考,具体如下: 首先我在数据库里建了两张表,一个是用户的积分表,一个是签到状态表,分来用来记录用户的积分数和先到状态   在用户签到状态表中我们有…

    2018年3月7日
    0347
  • PHP常用函数-(3)php时间处理常用的函数

    checkdate — 验证一个格里高里日期 date_default_timezone_get — 取得一个脚本中所有日期时间函数所使用的默认时区 date_default_timezone_set — 设定用于一个脚本中所有日期时间函数的默认时区 date_time_set — Se…

    2015年12月7日
    0290
  • (实用篇)PHP页面跳转到另一个页面的方法总结

    一、用HTTP头信息 也就是用PHP的header函数。PHP里的header函数的作用就是向浏览器发出由HTTP协议规定的本来应该通过WEB服务器的控制指令,例如声明返回信息的类型("Context-type: xxx/xxx"),页面的属性("No cache…

    2016年10月21日
    0327
  • 重蔚php学习第二十九天——php字符串相关函数

    l  int strlen(string str) :取得字符串长度 l  string substr(string string,int start[,int len]) :截取字符串 string string:原字符串 int start:从哪开始截取 [,int len]:可选,截取长度 l  string strtolo…

    2017年10月5日
    0220
  • PHP中define() 函数的定义和用法

    define() 函数定义一个常量。 常量类似变量,不同之处在于: 在设定以后,常量的值无法更改 常量名不需要开头的美元符号 ($) 作用域不影响对常量的访问 常量值只能是字符串或数字 define()语法 define(name,value,c…

    2018年3月13日
    0277
  • PHP函数的介绍

    说明:函数的作用在于对一个功能的封装,封装后在别的页面中引入并调用,可以节省代码量,可以冗余。 8.1.1函数的定义 Function 函数名(【形参1】【,参数2】【,形参n......】){ 要封装到函数的代码; 【return 返回…

    2018年4月4日 PHP自学教程
    0232

联系我们

QQ:951076433

在线咨询:点击这里给我发消息邮件:951076433@qq.com工作时间:周一至周五,9:30-18:30,节假日休息