Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php move index of a value to first position in array

//appending $new in our array 
array_unshift($arr, $new);
//now make it unique.
$final = array_unique($arr);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #move #index #position #array
ADD COMMENT
Topic
Name
1+1 =