1. Character encoding: The character encoding used in a file indicates what character the file will display. Set character encoding <meta .....charset=utf-8>
2. PHP sends data to Web browser: Echo, print
3. Comments:
#编号注释; #This is a comment
Double slash://this is also a comment
/* * *: Allows annotations to be distributed across multiple lines.
4. Pre-defined variables: $_server[' script_filename ', ' http_user_agent ', ' server_software ']
5. String function:
strlen string length;
. connection string;
Strtolower () string becomes lowercase;
Strtoupper () string to uppercase
Ucfirst () first character uppercase
Ucwords () capitalizes the first character of each word.
. = Join Assignment operator
6, the number function:
Round () rounding the nearest integer
Number_format () Converts a number to a more common representation format, using a comma as the thousand separator character.
7, constant definition:
Define (' PI ', 3.14)
Echo PI
8, double quotes and single quotes
Single quotation marks: The values within will be processed in the literal sense. The value within the double quotation marks is interpreted.
Basic PHP Learning