Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php remove element from array

$array = [0 => "a", 1 => "b", 2 => "c",3=>"d"];
//Params are: array,index to delete,number of elements to remove
array_splice($array, 2, 1); 
//print_r($array); 
//Array
//(
//    [0] => a
//    [1] => b
//    [2] => d
//)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #remove #element #array
ADD COMMENT
Topic
Name
2+1 =