What's the best way to copy an array and keep the keys with empty values
        Posted  
        
            by Andres
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andres
        
        
        
        Published on 2010-04-18T07:10:33Z
        Indexed on 
            2010/04/18
            7:13 UTC
        
        
        Read the original article
        Hit count: 366
        
In PHP, what's the best way to copy an array and keep the keys with empty values?
array1 = array("apple" => "green", "banana" => "yellow);
I want to copy array1 to array2 and keep only the keys...
array2 = array("apple" => "", "banana" => "");
© Stack Overflow or respective owner