1 / 4

PHP5

PHP5. Array concepts. Basic Array. If you do not set the key when you create an array the initial value is 0 and then it auto increments $ arr [] = “First index”; $ arr [] = “Second index”; print($arr[1]); // is “Second index” print($arr[0]); // is “First index”. Array Unordered.

Download Presentation

PHP5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PHP5 Array concepts

  2. Basic Array • If you do not set the key when you create an array the initial value is 0 and then it auto increments $arr[] = “First index”; $arr[] = “Second index”; print($arr[1]); // is “Second index” print($arr[0]); // is “First index”

  3. Array Unordered • You can specifically give an array key and not do this in a specific order $arr[12] = “First index”; $arr[9] = “Second index”; print($arr[9]); // is “Second index” print($arr[12]); // is “First index”

  4. Associative Array • You can specifically give an array key a name $arr[‘name_first’] = “Ray”; $arr[‘name_last’] = “Gubala”; print($arr[‘name_first’]); // is “Gubala” print($arr[‘name_last’]); // is “Ray”

More Related