PHP String Functions

Source: Internet
Author: User

1. Format the OUTPUT function:

1.ltrim () Remove left space

2.rtrim () Remove right space

3.trim () Remove both spaces

4.str_pad () fills the string as a new function

5.strtolower () Converts a string to lowercase

6.strtoupper () Convert string to uppercase

7.ucfirst () capitalize the first character in a string

8.Ucwords () capitalize the first letter of each word in the string

9.NL2BR () inserts each new line in the string before the HTML entity

10.htmlentities () Convert string to HTML entity

11.htmlspeciachars () Convert some pre-defined strings to HTML entities

12.Strislashes () Remove backslashes added by the addcsashes () function

13.strip_tags () strips HTML xml and PHP tags

14.number_format () formatting numbers with thousands of groups

15.strrev () Invert string

16.MD5 () computes a string MD5

2. Comparison function:

1.STRCMP ()

2.STRCASECMP () ignores letter case comparisons in strings

    
3. Replace function:

4. Find functions

PHP String Functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.