Here is one type of approach that you can use.
for( $i = 0; $i < @array; $i++){ if( $array[$i] == $look ) { @out = (@array[0..($i-1)], @array[($i+1)..scalar(@array)], $arra +y[$i]); last; } }
In reply to Re: changing the position of an element in an array
by neosamuri
in thread changing the position of an element in an array
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |