Php datatypes

From wikinotes

Strings

$firstname = "darth";
$fullname = "$name vader";  // string interpolation

Numbers

Arrays

Arrays in php are not homogenous, and include datatypes like associative arrays.

Indexed Arrays

$arr = array("a", "b", "c");
count($arr);                // get length of array
array_push($arr, "d");      // append to array
array_map($arr, $callable);

Associative Arrays

$dict = array("a" => 1, "b" => 2, "c" => 3);
$dict["a"];