Indexed array ptint_r var_dump
<?php

$colors = ["Red", 7735, "Blue"];
$colors[] = "Yellow";  //add new member in last position


echo $colors[0]; 

echo "\n\n\n";

print_r($colors);

echo "\n\n\n";

var_dump($colors);
OUTPUT:
Red


Array
(
    [0] => Red
    [1] => 7735
    [2] => Blue
    [3] => Yellow
)



array(4) {
  [0]=>
  string(3) "Red"
  [1]=>
  int(7735)
  [2]=>
  string(4) "Blue"
  [3]=>
  string(6) "Yellow"
}
by otar datuadze
2 years ago
PHP
0
Pro tip: use ```triple backticks around text``` to write in code fences