mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-20 21:14:04 +00:00
22 lines
423 B
PHP
22 lines
423 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Segments\Services;
|
|
|
|
class RemoveItemFromConstantValueArray
|
|
{
|
|
|
|
/**
|
|
* @param array $array
|
|
* @param $item
|
|
* @return array
|
|
*/
|
|
public function execute($array, $item): array {
|
|
foreach($array as $key => $value){
|
|
if($array[$key] == $item){
|
|
unset($array[$key]);
|
|
}
|
|
}
|
|
return array_values($array);
|
|
}
|
|
|
|
} |