first commit

This commit is contained in:
2023-04-12 11:55:10 +07:00
commit e0dc21312f
17 changed files with 256 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
/**
* Menghapus todo di list
*/
function removeTodoList(int $number): bool
{
global $todoList;
if ($number > sizeof($todoList)) {
return false;
}
for ($i = $number; $i < sizeof($todoList); $i++) {
$todoList[$i] = $todoList[$i + 1];
}
unset($todoList[sizeof($todoList)]);
return true;
}