fork download
  1. <?php
  2.  
  3. $array = [
  4. 0 => 'Fellipe',
  5. 1 => 'Fábio',
  6. 2 => 'Mateus',
  7. 3 => 'Gustavo'
  8. ];
  9.  
  10. unset($array[2]);
  11.  
  12. $array = array_values( $array );
  13.  
  14. print_r( $array );
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Fellipe
    [1] => Fábio
    [2] => Gustavo
)