PHP: key - Manual in English
PHP: key - Manual in Deutsch
PHP: key - Manual in Polish

Vous êtes à PHP: key - Manual Area


recherches récentes:
incluez les fonctions , fonctions variables , fonctions de poteau...




Si vous êtes nouveau au PHP ou devez juste régénérer vos qualifications, c'est l'endroit à commencer. Cette série de cours d'instruction te donnera la connaissance de base que vous devrez créer un simple Site Web de PHP.

Le PHP est un langage de programmation r3fléchissant à l'origine conçu pour produire les pages Web dynamiques. [1] Le PHP est employé principalement dans le serveur-côté scripting, mais peut être employé d'une ligne de commande interface ou dans des applications graphiques autonomes. Des interfaces utilisateurs textuelles peuvent également être créées utilisant des ncurses.

Retourne une clé d'un tableau associatif


key

(PHP 4, PHP 5)

key — Retourne une clé d'un tableau associatif

Description

mixed key ( array &$array )

key() retourne la clé courante dans le tableau array .

Liste de paramètres

array

Le tableau.

Valeurs de retour

Retourne l'index.

Exemples

Exemple #1 Exemple avec key()

<?php
$array 
= array(
    
'fruit1' => 'apple',
    
'fruit2' => 'orange',
    
'fruit3' => 'grape',
    
'fruit4' => 'apple',
    
'fruit5' => 'apple');

// Cette boucle affiche toutes les clés
// dont la valeur vaut "apple"
while ($fruit_name current($array)) {
    if (
$fruit_name == 'apple') {
        echo 
key($array).'<br />';
    }
    
next($array);
}
?>

L'exemple ci-dessus va afficher :

fruit1<br />
fruit4<br />
fruit5<br />

Voir aussi


Najlepsza hurtownia bielizny znajduje się w Olsztynie
drukarki kodow kreskowych
Agencja Reklamowa Katowice
napisanie artykułów
Pisanie tekstów na potrzeby SEO
902 903

Des autres fonctions utiles :


simplexmliterator.key | recursiveiteratoriterator.key | recursivedirectoryiterator.key | openssl.key-types | ncurses.keyconsts | locale.getkeywords | keyword.parent | keyword.paamayim-nekudotayim | keyword.extends | function.ssh2-publickey-remove | function.ssh2-publickey-list | function.ssh2-publickey-init | function.ssh2-publickey-add | function.ssh2-auth-pubkey-file | function.sqlite-key | function.radius-demangle-mppe-key | function.pdf-set-info-keywords | function.openssl-x509-check-private-key | function.openssl-pkey-new | function.openssl-pkey-get-public | function.openssl-pkey-get-private | function.openssl-pkey-get-details | function.openssl-pkey-free | function.openssl-pkey-export | function.openssl-pkey-export-to-file | function.openssl-get-publickey | function.openssl-get-privatekey | function.openssl-free-key | function.openssl-csr-get-public-key | function.odbc-primarykeys | function.odbc-foreignkeys | function.newt-wait-for-key | function.newt-listbox-set-current-by-key | function.newt-form-add-hot-key | function.newt-clear-key-buffer | function.ncurses-keypad | function.ncurses-keyok | function.ncurses-has-key | function.ncurses-define-key | function.ming-keypress | function.mhash-keygen-s2k | function.mcrypt-module-get-supported-key-sizes | function.mcrypt-module-get-algo-key-size | function.mcrypt-get-key-size | function.mcrypt-enc-get-supported-key-sizes | function.mcrypt-enc-get-key-size | function.m-transkeyval | function.m-responsekeys | function.key | function.hwapi-attribute-key | function.gnupg-keyinfo | function.gnupg-clearsignkeys | function.gnupg-clearencryptkeys | function.gnupg-cleardecryptkeys | function.gnupg-addsignkey | function.gnupg-addencryptkey | function.gnupg-adddecryptkey | function.dbplus-rkeys | function.dba-nextkey | function.dba-key-split | function.dba-firstkey | function.db2-primary-keys | function.db2-foreign-keys | function.array-keys | function.array-key-exists | function.array-intersect-ukey | function.array-intersect-key | function.array-fill-keys | function.array-diff-ukey | function.array-diff-key | function.array-change-key-case | filteriterator.key | directoryiterator.key | constants.newt.keys | collator.sortwithsortkeys | arrayiterator.key |


Le PHP est une langue scripting d'usage universel employée couramment qui approprié particulièrement au développement de Web et peut être enfoncée dans le HTML. Si vous êtes nouveau au PHP et voulez avoir une certaine idée de la façon dont cela fonctionne, essayez le cours d'instruction d'introduction. Après ce, vérifiez le manuel en ligne, et l'exemple archivez les emplacements et certaines des autres ressources disponibles dans la section de liens.