Strip whitespace from array keys (anywhere in key)

Run Settings
LanguagePHP
Language Version
Run Command
<?php $my_array = array( 'one 1' => '1', 'two 2' => '2' ); $keys = str_replace( ' ', '', array_keys( $my_array ) ); $results = array_combine( $keys, array_values( $my_array ) ); var_dump( $results );
Editor Settings
Theme
Key bindings
Full width
Lines