repo.or.cz
/
todo-rest-api_edi2-2023.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'dummy-session'
[todo-rest-api_edi2-2023.git]
/
get_items.php
blob
9231a0ee98854c744fa804fcf68f7e0752ebae16
1
<
?php
2
3
function
handle_request
(
$id
,
$input
) {
4
$list
= [];
5
6
if
(!
empty
(
$_SESSION
[
'items'
])) {
7
foreach
(
$_SESSION
[
'items'
]
as
$item
) {
8
$list
[] =
$item
;
9
}
10
}
11
12
echo
json_encode
(
$list
);
13
}