public function shouldUpdateFile($model) { if (isset($_POST['updatefile'])) { foreach ($_POST['updatefile'] as $hash => $value) { if ($_POST['filename'][$hash] == $model) { return true; } } } return false; }