PHP: Basic Fundamental Guide for Beginners by Martin MG

PHP: Basic Fundamental Guide for Beginners by Martin MG

Author:Martin, MG [Martin, MG]
Language: eng
Format: azw3
Published: 2018-06-12T16:00:00+00:00


$books = array (“Tom and Mary”, “The happy ending”, “The Storm”);

In this second example, the index is assigned manually:

$books [0] = “Tom and Mary”;

$books [1] = “The happy ending”;

$books [2] = “The Storm”;

Associative arrays

In this array, we will link the key with the value stored. But, when you want to store the type of data related to individual values, a numeric array is never the best to use. Instead, an associative array is the best option to go with.

This example uses an array to assign the age of various people:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.