i want to replace underscore with hyphen (dash) in all the keys in my $array and nothing else.
Here is my array:
Array ( [username] => bob [email] => [email protected] [first_name] => Bob [last_name] => Jones [picture] => /images/no-picture.png [birthday] => )
in this example, i want to replace [first-name] with [first_name] and ever other key that has a - to be replaced with _. i ONLY want the key an not the value. for example, i do NOT want no-picture.png because that is a value. thanks!
$test = str_replace('-', '_', $array);