PHP Learning Notes-1

Source: Internet
Author: User

PHP Basic Syntax

PHP scripts can be placed anywhere in the document;

PHP script to <? php to start with ? > end;

PHP files usually include HTML tags and some php script code;

Give me a chestnut:

1 2 3 4 5 6 7 <?  8echo "Hello world!"  9 
View Code

It is important to note that every sentence in PHP is ended. ; is a delimiter used to separate the instruction set. Echo and print are the basic instructions for outputting text in the browser.

PHP Variable rules:

    • The variable starts with the $ sign, followed by the name of the variable
    • Variable names must start with a letter or underscore character
    • Variable names can contain only alphanumeric characters and underscores (A-Z, 0-9, and _)
    • Variable names cannot contain spaces
    • Variable names are case-sensitive ($y and $Y are two different variables)

Both the PHP statement and the PHP variable are case-sensitive.

PHP Learning Notes-1

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.