דוגמה
1
.
each(
)
examples
-
-
0 = 'Robert'
-
1 = 'Bob'
-
key = 'Robert'
-
value = 'Bob'
each(
)
is
typically
used
in
conjunction
with
list(
)
to
traverse
an
array
;
for
instance
,
$HTTP_POST_VARS
:
דוגמה
2
.
Traversing
$HTTP_POST_VARS
with
each(
)
echo
"
Values
submitted
via
POST
method
:
br
"
;
reset
($HTTP_POST_VARS)
;
while
(list
($key
,
$val
)
=
each
($HTTP_POST_VARS)
)
{
echo
"$key
=
$val
br
"
;
}
|
|
See
also
key(
)
,
list(
)
,
current(
)
,
reset(
)
,
next(
)
,
prev(
)
,
and
foreach(
)
.
|