Arrays in PHP

An array in PHP is actually an ordered map. A map is a type that associates values to keys.
This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more.

Example :  Indexed arrays without key


<?php
$array = array("jack", "Nakiya", "hello", "World");
var_dump($array);
?>
The above example will output:

array(4) {
  [0]=>
  string(3) "jack"
  [1]=>
  string(3) "Nakiya"
  [2]=>
  string(5) "hello"
  [3]=>
  string(5) "World"
}

1 comment:

how to call ssh from vs code

 To call SSH from VS Code, you can use the built-in Remote Development extension. This extension allows you to open a remote folder or works...