Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p>The next array item gets the index 15:</p>
<pre>
<?php
$cars[5] = "Volvo";
$cars[7] = "BMW";
$cars[14] = "Toyota";
array_push($cars, "Ford");
var_dump($cars);
?>
</pre>
</body>
</html>

The next array item gets the index 15:

array(4) {
  [5]=>
  string(5) "Volvo"
  [7]=>
  string(3) "BMW"
  [14]=>
  string(6) "Toyota"
  [15]=>
  string(4) "Ford"
}