[?] Php?? Function

Source: Internet
Author: User
? From: http://www.cnblogs.com/mrray/archive/2011/05/18/2050233.html

Strtoupper ($string);//Change All caps

Strtolower ($string);//Change All lowercase

Ucwords ($string);//capitalize the first letter of the word

The Strrpos () function finds the position of the last occurrence of a string in another string. [String,]

PHP's data type conversions are cast, and the PHP data types that are allowed to be converted are:

(int), (integer): Converted to shape (float), (double), (real): converted to floating point (string): Converted to a string (bool), (Boolean): Converted to a Boolean type (array): Convert an array (object): Convert to Object

There are three ways to convert PHP data types:

Use the common type conversion function Settype (Intval (), Floatval (), Strval () to convert the variable you want to convert, and the target type enclosed in parentheses using a conversion function of 3 specific types (mixed var,string type)

First conversion Mode: (int) (bool) (float) (string) (array) (object)

Second mode of conversion: Intval () floatval () Strval ()

The third mode of conversion: Settype ();

  • 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.