mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
12 lines
238 B
PHP
12 lines
238 B
PHP
<?php
|
|
|
|
class PHPUtils
|
|
{
|
|
public static function removeElementFromArray(&$arr, $element, $reindex = true){
|
|
if (($key = array_search($element, $arr)) !== false) {
|
|
unset($arr[$key]);
|
|
if($reindex) $arr = array_values($arr);
|
|
}
|
|
}
|
|
}
|
|
|