login  Naam:   Wachtwoord: 
Registreer je!
 Overzicht:
Overzicht > PHP > Arrays > array_key_exists

Gebruik:
bool array_key_exists ( mixed $key, array $array)

Uitleg:
Stuurt true terug als het eerste argument een key is van he tweede argument (array).


Voorbeeld:
<?php

    $array 
= array(     "een" => 1,
                        
"twee" => 2,
                        
"drie" => 3
                
);
        
    if( 
array_key_exists"twee"$array ) ) {
    
        echo 
"Key twee bestaat";
        
    }
    
    
/*output
    
        Key twee bestaat
        
    */
    
?>

Bijdragen :
Er zijn nog geen bijdragen.


 Overzicht
array()
array_change_key_...
array_chunk()
array_combine
array_count_values()
array_diff_assoc()
array_fill()
array_intersect()
array_keys()
array_key_exists
array_multisort()
array_pop()
array_push()
array_reverse()
array_shift()
array_sum()
array_unique()
array_values()
count()
end()
explode()
implode()
in_array()
natcasesort()
reset()
rsort()
shuffle()
sizeof()
sort()



© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.012s