Goal Planning:
Through the first lesson, we can understand the php environment.
1. Understanding of the environment:
2.Access method:
3. Modify the code and view it.
4. Use of variables
5. Code indentation should be hierarchical, and it is best to keep blank lines between codes
6. Variable naming:
7. Output of variables:
8. Three methods of variables:
1. Understanding of the environment:
Software download address: http://download.csdn.net/detail/junzaivip/7697331
The installation tutorial is very simple, you can search it on Baidu yourself
Directory structure after installation:
喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PC9wPgo8cD4yLrfDzsq3vbeoOjwvcD4KPHA+1rG909Ta5K/AwMb3yuTI6zpsb2NhbGhvc3QgvLS/ybfDzso8L3A+CjxwPjwvcD4KPHA+My7Q3rjEtPrC67ywsum/tC Suggested writing methods
<?php echo "<html>"; echo "Hello world"; echo "/html"; ?>
<span style="font-family: Arial, Helvetica, sans-serif;"><html></span><span style="font-family: Arial, Helvetica, sans-serif;"> <?php echo "hello world";?></span><span style="font-family: Arial, Helvetica, sans-serif;"></html></span>
<?php $name="junzaivip"; echo "{$name} is good"; ?>
<?php $arr=array("胡军","垒成","大哥"); print_r($arr); var_dump($arr); ?>
From the above display, we can see that the display is very ugly and does not require reading, so the formatted output solution is:
<?php $arr=array("胡军","垒成","大哥"); echo "<pre class="code">"; print_r($arr); echo "
When encoding in Utf-8, a Chinese character is 3 characters
When gbk is encoded, one Chinese character is 2 characters