Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php force array keys trim

$my_array = array( 'one 1' => '1', 'two 2' => '2' );
$keys = str_replace( ' ', '', array_keys( $my_array ) );
$results = array_combine( $keys, array_values( $my_array ) );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #force #array #keys #trim
ADD COMMENT
Topic
Name
6+6 =