Goal Planning:
Through the first lesson, we can learn about the PHP environment.
1. Understanding of the environment:
2. Access method:
3. Modify the code and view.
4. Use of variables
5. Code indentation to have a hierarchical relationship, and the best between the code to keep blank lines
6. Variable Name:
7. Output of variable:
8. Three methods of variable:
1. Understanding of the environment:
Software Download Address: http://download.csdn.net/detail/junzaivip/7697331
Installation tutorial is very simple, you can own Baidu
Directory structure after installation:
<喎?http: www.2cto.com="" kf="" ware="" vc="" "="" target="_blank" class="keylink"> vcd4kpha+pc9wpgo8cd4ylrfdzsq3vbeoojwvcd4kpha+1rg909ta5k/awmb3yuti6zpsb2nhbghvc3qgvls/ybfdzso8l3a+ cjxwpjwvcd4kpha+my7q3rjetprc67ywsum/tc48l3a+cjxwps7sw8e/ydlu0n64xmnpw+bev8k8d3d31tc1xgluzgv4lnbocdwvcd4kpha+ Cghwyusz9mh0bwy0+slro7o8l3a+cjxwpjwvcd4kphbyzsbjbgfzcz0= "Brush:java;" >
";
echo "Hello World";
echo "/html";
? >
Suggested wording
4. Use of variables
5. Code indentation to have a hierarchical relationship, and the best between the code to keep blank lines
6. Variable Name:
6.1. Try not to use Chinese
6.2. Try not to start with numbers
6.3. Try not to use meaningless letters
6.4. Variable names are case-sensitive, function names are case-insensitive, class names are not case-sensitive, and simply variable names and functions are all lowercase.
6.5. Definition of variable must be added $
7. Output of variable:
Echo $name;
8. Three methods of variable:
Echo ($name); Output variables
Var_dump ($name);//output array, and print type and length
Print_r ($name);//output array
Example
Shows the following
Through the above display, we can see that the display is very beautiful, and do not read, so format the output scheme:
";
Print_r ($arr);
echo "
";?>
The results appear as follows:
Small knowledge:
Utf-8 encoding, a Chinese text is 3 characters
GBK encoding, one Chinese is 2 characters