programming-examples/php/Arrays/Delete an element from the above array.php

9 lines
123 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?php
$x = array(1, 2, 3, 4, 5);
var_dump($x);
unset($x[3]);
$x = array_values($x);
echo '
';
var_dump($x);
?>