I have two arrays
$alpha=array('a','b','c','d','e','f');
$index=array('2','5');
I need to remove elements in the first array with index from the second array.
(Delete c-index is 2 and index f is 5)
So the returned array
{'a', 'b', 'd', 'e'}
How can I do this using PHP? Thanks
Edit
Actually I need a finite array as follows
[0]=>a
[1]=>b
[2]=>d
[3]=>e
Reset returns an array with the same index
0 => string 'a'
2 => string 'c'
3 => string 'd'
4 => string 'e'
source
share