[Go to WeChat public platform 7] A brief introduction to PHP syntax

Source: Internet
Author: User
[Go to the public platform 7] After a brief introduction to PHP syntax, we have finally become a developer of the public platform. But don't be happy too early, just like the story of the truth: After years of practice, Wu broke the void, and after flying to the Xianjie community, I thought it would be a fairy to jump out of the three worlds, not in the five lines. It can be found in Xianjie that being a fairy is only the first step in spiritual practice ......
Yes, it is only the first step to become a developer, because your public platform does not have any features yet, It's hard to hear about it. it's good to say it's Prince Charming. it's just a little bit cute. it's just a little bit yellow...

----------------
To add a function to the public platform, you need to write code. when writing code, you must use php (if ASP or Java is used, so you must understand how to use php? If you understand it, you don't need to read it down. if you don't understand it, do you? Start!

What language is PHP? PHP is a powerful server-side scripting language that creates dynamic interaction sites that love you ).
1. First of all, I will introduce php development tools. There are many options, such as using Dreamweaver for development. this is also familiar to everyone.

For: http://yunpan.cn/QiPjymeWbuceR access password e7df. The installation process is simple and skipped.
Of course, SAE also provides the code online editing function, but it is not very convenient.

2. The following describes the php syntax.
1) php code (script block)
It can be placed anywhere in the document, but there must be a sign to remind you, This flag is" "End. For example, print a simple string below: hello star
 

2) php variables.
All the variables in php start with the $ symbol.
When declaring a variable, you do not need to specify the type of the variable, because php will automatically convert the variable to the correct data type. This is very different from C, Java, and other languages. As follows:
 
To put it simply, set $ a to 5 above, and php will automatically set $ a to an integer variable. $ B.

3) php link operator.
The connection operator in php is "." (an English period)
. It can connect strings, When the operand contains a non-string, it is first converted to a string.And then connect the string, as shown in the following code:
 
4) php operators
This is simple and simple, but it is a little tricky to talk about, so you can directly give a link to see it. (Narrator: why are you so lazy, blogger? Blogger: you need to take care of it !)
Http://www.w3school.com.cn/php/php_operators.asp

5) In fact, if you have mastered the above points, developing a simple public platform is barely enough to read. we recommend that you go to w3c for the rest of the content. The above tutorials are all very good. they are websites that you cannot miss to learn php!

Http://www.w3school.com.cn/php/index.asp


Well, let's get it up here, hand it!
Respect original, reprinted please indicate Source: http://blog.csdn.net/star530/article/details/25744137

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.