html&php Study notes (2)

Source: Internet
Author: User

PHP tagged <?php?>

Semicolon-delimited statement.

HTML PHP ignores interval characters (carriage return, space, TAB)

Multiline Comment:/* */

Single-line Comment: #//

Connection operator (.)

form variables

$_post[' var '] $_get[' var '] $_request[' var '//Super global variable

Double quotes can refer to the variable echo "$var <br/>"; Single quotes are not allowed

The single-quote string is treated as true text, and PHP tries to calculate the double-quote string

Identifiers cannot start with numbers and are case-sensitive.

Variable variable:

$b = ' a ';

$ $b = 1;

A = 1

Declare constant define (' XXX ', 10); Reference constants do not require $

Reference Operators &

1 $a = 5; 2 $b $a ; 3 $a // $b = 5 4 5 $b = &$a; 6 $a = 7;  // $b = 7

unset ($a); Reset

To set the variable type:

GetType ($a);

Settype ($a, ' double ');

html&php Study notes (2)

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