Hướng dẫn in php function is used to convert a string to lowercase - trong hàm php được sử dụng để chuyển đổi một chuỗi thành chữ thường

Cải thiện bài viết

Lưu bài viết

  • Đọc
  • Bàn luận
  • Cải thiện bài viết

    Lưu bài viết

    Đọc

    Syntax::

    string strtolower( $string )
    

    Bàn luận: The only parameter to this function is a string that is to be converted to lower case.

    Hàm strtolower () được sử dụng để chuyển đổi một chuỗi thành chữ thường. Hàm này lấy một chuỗi làm tham số và chuyển đổi tất cả các bảng chữ cái tiếng Anh từ trên có trong chuỗi thành chữ thường. Tất cả các ký tự số hoặc ký tự đặc biệt khác trong chuỗi vẫn không thay đổi.: This function returns a string in which all the alphabets are lower case.

    Examples:

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    

    Tham số: Tham số duy nhất cho hàm này là một chuỗi sẽ được chuyển đổi thành chữ thường.

    Giá trị trả về: Hàm này trả về một chuỗi trong đó tất cả các bảng chữ cái là chữ thường.:

    Dưới đây các chương trình minh họa hàm strtolower () trong PHP:

    Chương trình 1:

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    5$resStr
    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    4

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    8

    Output:

    geeksforgeeks
    

    $str = ______7:

    $resStr =

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    1__12

    Chương trình 1:

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    5$resStr
    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    4

    Input : $str  = "GeeksForGeeks"
            strtolower($str)
    Output: geeksforgeeks
    
    Input : $str  = "going BACK he SAW THIS 123$#%"
            strtolower($str)
    Output: going back he saw this 123$#%
    
    8

    Output:

    going back he saw this 123$#%
    

    Reference:http://php.net/manual/en/function.strtolower.php:
    http://php.net/manual/en/function.strtolower.php

    $str = ______7

    17 năm trước

    Strtolower - Tạo chữ thường chuỗiMake a string lowercase

    Sự mô tả

    Strtolower (Chuỗi

    going back he saw this 123$#%
    
    4): Chuỗi(string
    going back he saw this 123$#%
    
    4
    ): string

    Byte trong phạm vi

    going back he saw this 123$#%
    
    5 (0x41) thành
    going back he saw this 123$#%
    
    6 (0x5a) sẽ được chuyển đổi thành chữ thường tương ứng bằng cách thêm 32 vào mỗi giá trị byte.

    Điều này có thể được sử dụng để chuyển đổi các ký tự ASCII trong các chuỗi được mã hóa bằng UTF-8, vì các ký tự UTF-8 Multibyte sẽ bị bỏ qua. Để chuyển đổi các ký tự không phải là ASCII, hãy sử dụng mb_strtoLower ().mb_strtolower().

    Thông số

    going back he saw this 123$#%
    
    7

    Chuỗi đầu vào.

    Trả về giá trị

    Trả về chuỗi thấp hơn.

    Thay đổi

    Phiên bảnSự mô tả
    8.2.0 Chuyển đổi trường hợp không còn phụ thuộc vào tập hợp địa phương với setlocale (). Chỉ các ký tự ASCII sẽ được chuyển đổi.setlocale(). Only ASCII characters will be converted.

    Ví dụ

    Ví dụ #1 Strtolower () Ví dụstrtolower() example

    going back he saw this 123$#%
    
    8

    Ghi chú

    Lưu ý: Hàm này an toàn cho nhị phân.: This function is binary-safe.

    Xem thêm

    • strtouper () - tạo một chuỗi chữ hoa
    • ucfirst () - Tạo nhân vật chữ hoa đầu tiên của chuỗi
    • ucwords () - chữ hoa, ký tự đầu tiên của mỗi từ trong một chuỗi
    • mb_strtolower () - tạo chữ thường chuỗi

    Marcin tại Maydesign dot pl ¶

    12 năm trước

    going back he saw this 123$#%
    
    9

    0

    1

    2

    3

    coder tại Bulgaria dot bg ¶

    13 năm trước

    4

    5

    6

    3

    dbers26 tại gmail dot com

    13 năm trước

    8

    9

    $str0

    $str1

    $str2

    $str3

    dbers26 tại gmail dot com

    Patricia tại Steuerungb dot de ¶

    $str4

    $str5

    3

    15 năm trước

    Patricia tại Steuerungb dot de ¶

    $str7

    $str8

    3

    15 năm trước

    Rok dot kralj tại gmail dot com ¶

    = 0

    = 1

    = 2

    Rodrigoatsistemasparainterdotcomdotbr ¶

    Patricia tại Steuerungb dot de ¶

    = 3

    = 4

    = 5

    = 6

    3

    15 năm trước

    Rok dot kralj tại gmail dot com ¶

    = 8

    = 9

    3

    Rodrigoatsistemasparainterdotcomdotbr ¶

    14 năm trước

    "GeeksForGeeks"1

    "GeeksForGeeks"2

    "GeeksForGeeks"3

    "GeeksForGeeks"4

    "GeeksForGeeks"5

    3

    Marco tại Recchiuti chấm nó ¶

    Patrick ¶

    "GeeksForGeeks"7

    "GeeksForGeeks"8

    "GeeksForGeeks"9

    3

    16 năm trước

    bkimble tại ebaseweb dot com ¶

    ;1

    ;2

    3

    19 năm trước

    13 năm trước

    ;4

    ;5

    ;6

    ;7

    dbers26 tại gmail dot com

    Patrick ¶

    ;8

    ;9

    3

    16 năm trước

    Rok dot kralj tại gmail dot com ¶

    $resStr1

    $resStr2

    $resStr3

    $resStr4

    Rodrigoatsistemasparainterdotcomdotbr ¶

    14 năm trước

    $resStr5

    $resStr6

    $resStr7

    $resStr8

    Marco tại Recchiuti chấm nó ¶

    Chuỗi JavaScript tolowerCase () Phương thức tolowerCase () chuyển đổi một chuỗi thành chữ thường.toLowerCase() The toLowerCase() method converts a string to lowercase letters.

    Làm thế nào chúng ta có thể chuyển đổi một chuỗi thành chữ hoa và chữ thường?

    Phương thức TOUPPERCase () chuyển đổi một chuỗi thành chữ cái trên.Lưu ý: Phương thức tolowerCase () chuyển đổi một chuỗi thành chữ cái chữ thường.. Note: The toLowerCase() method converts a string to lower case letters.

    Chức năng nào chuyển đổi một chuỗi thành tất cả chữ hoa trong PHP?

    Hàm strtouper () chuyển đổi một chuỗi thành chữ hoa.strtoupper() function converts a string to uppercase.