PHP Learning notes _5_ array and predefined variables (not finished)

Source: Internet
Author: User
PHP has two types of arrays, indexed arrays and associative arrays, which are declared in a similar manner, mainly in the following three ways of declaring:

How to declare:
Array (); Can declare any array, see the following example


  
   1,2,3);    print_r($temp);//这是打印数组的方法/**    输出的结果,Array90    **/

Note the point:
1. Null to do the data key will be turned into an empty string;
2. When a new value is added, the array is labeled as the current maximum subscript plus 1, if the subscript maximum is negative, the index is 0 when an element with an unspecified index is added;
3.

$_POST:接收表单以POST发送的数据$_GET:接收表单以GET方式发送的数据$_REQUEST:$_GET+$_POST+$_COOKIE$_FILES:HTTP文件上传变量$_SERVER:服务器与执行环境变量$_ENV:环境变量$_SESSION:会话变量$_COOKIE:http cookie$_GLOBALE:预定义变量的总集合$php_errormsg:前一个错误信息(只在错误发生的作用域内可用,需要开启php.ini里track_error配置项)

Copyright NOTICE: This article is the original article, reprint need to indicate the source, the article view only represents the view at that time, there must be insufficient, welcome to make bricks remind, thank you very much!

The above describes the PHP learning Note _5_ array and predefined variables (not finished), including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

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