fazlurr
7/21/2016 - 7:07 AM

Delete element from array by value - http://stackoverflow.com/a/7225113

Delete element from array by value - http://stackoverflow.com/a/7225113

<?php
// Helper - Remove value from array
function se_remove_from_array($array, $value) {
	if (($key = array_search($value, $array)) !== false) {
		unset($array[$key]);
	}
	return $array;
}