★ wanayoo — archive 1999 http://fr.php.net/manual/de/function.current.phpNouvelle recherche | Portail wanayoo
PHP Thursday, March 08, 2001  
downloads | documentation | support | reporting bugs | links | search:  

lookup:
PHP HandbuchPHP Handbuch
ArraysArrays
 arrayarray
 array_count_valuesarray_count_values
 array_fliparray_flip
 array_keysarray_keys
 array_mergearray_merge
 array_merge_recursivearray_merge_recursive
 array_multisortarray_multisort
 array_padarray_pad
 array_poparray_pop
 array_pusharray_push
 array_randarray_rand
 array_reversearray_reverse
 array_shiftarray_shift
 array_slicearray_slice
 array_splicearray_splice
 array_unshiftarray_unshift
 array_valuesarray_values
 array_walkarray_walk
 arsortarsort
 asortasort
 compactcompact
 countcount
 currentcurrent
 eacheach
 endend
 extractextract
 in_arrayin_array
 keykey
 krsortkrsort
 ksortksort
 listlist
 nextnext
 pospos
 prevprev
 rangerange
 resetreset
 rsortrsort
 shuffleshuffle
 sizeofsizeof
 sortsort
 uasortuasort
 uksortuksort
 usortusort

previouscount
eachnext

Last updated: Thu, 01 Mar 2001
view this page in English | Brazilian Portuguese | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

current

(PHP 3, PHP 4 )

current -- Return the current element in an array

Description

mixed current (array array)

Every array has an internal pointer to its "current" element, which is initialized to the first element inserted into the array.

The current() function simply returns the array element that's currently being pointed by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list, current() returns false.

Warnung

If the array contains empty elements (0 or "", the empty string) then this function will return false for these elements as well. This makes it impossible to determine if you are really at the end of the list in such an array using current(). To properly traverse an array that may contain empty elements, use the each() function.

See also: end(), next(), prev() and reset().

previouscount
eachnext

Last updated: Thu, 01 Mar 2001
add note | about notes


show source | credits | mirror sites:  

Copyright © 1998,1999,2000,2001 The PHP Association, Inc.
All rights reserved.
This mirror generously provided by: L'Université Michel de Montaigne Bordeaux III
Last updated: Thu Mar 08 01:30:45 2001