Remove Specific Element From An Array PHP

Following code will help to remove a particular element from an array

<?php
$appliedRuleIs = array(370,369,400,500);
if (($key = array_search(‘369’, $appliedRuleIs)) !== false) {
unset($appliedRuleIs[$key]);
}
?>

 

Leave a Reply

Your email address will not be published. Required fields are marked *