Skip to content

Commit 708f45c

Browse files
authored
fix: import data pemilih (#28)
resolve #27
1 parent a9f467a commit 708f45c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

application/helpers/my_helper.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ function initialize_elfinder($value = '')
2020
return $opts;
2121
}
2222

23+
function searchForUsername($username, $array) {
24+
$res = [];
25+
foreach ($array as $key => $val) {
26+
if ($val['username'] === $username) {
27+
$res[] = $key;
28+
}
29+
}
30+
return $res;
31+
}
2332

2433
function j($data)
2534
{

0 commit comments

Comments
 (0)