For more information about the use of php basic learning variables, see.
The code is as follows:
// Reference
$ One = "test ";
Two = & $ one; // equivalent to the transfer address. the two variables point to an address.
// Dynamic variables
$ One = "######";
$ Two = "one ";
$ Three = "two ";
Echo $ three ."
"; // Output" two"
Echo $ three ."
"; // Output" one"
Echo $ three ."
"; // Output "######"
// Php has eight types
// Four scalar types: int integer
// Bool boolean
// Float, double, real
// String
// Two composite types: array
// Object
// Two special types: resource
// Null
// String declaration
// 1. single quotation marks and double quotation marks can both declare strings
// 2. the declared string has no length limit
// 3. in a double quotation mark string, both variables can be parsed directly and escape characters can be used directly (the single quotation mark itself can be escaped or the escape character "\" can be escaped "\")
// 4. variables cannot be parsed directly or escape characters in single quotes.
// 5. You cannot use double quotation marks in double quotation marks.
// 6. it is best to use single quotes,
$ Str = 'aaaaa ';
$ Str = "aaaa ";
// The delimiters declare strings, a large number of strings
// Test is a custom string, which cannot contain any characters or spaces.
// It must end with the custom string "test". no character is allowed before the end.
$ Str = < This write content ......
Test;
>
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.