Jump to content

[SOLVED] Removing extra Space from array keys (should be simple?)


emma57573

Recommended Posts

I have an array that looks like this:

 

Array ( [toy] => 5 [ baby toys ] => 4 [ cute] => 4 [ doll] => 4 [ soft toys] => 3 [ cloth] => 1 [ orange] => 1 [ sock] => 1 [ monster] => 1 [ sewing] => 1 [ pink] => 1 )

 

Now I want to remove the extra space at the beginning and end of the array keys like [ baby toys ] should be [baby toys]

But I can seem to do it without turning [ baby toys ] into [babytoys] which is not what I want!. I just want to remove the space at the beginning and end if they exsist. Any ideas?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.