I have a php array like this
Array
(
[0] => WVSE1P
[1] => WVSE1MA
[2] => WVSEU1Y
[3] => WVSEUP
)
how do i remove a particular entry in it by passing the value?
below is the code i tried:
$array = $items; //array is items
foreach($array as $key => $value)
{
$val= 'WVSE1P'; //item to remove
if ($value == $val) unset($array[$key]);
}
but it doesn't seem to work.