Changing array keys

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Changing array keys

Post by impulse() »

I have been left with an array like the following:
Array ( [0] => [2] => stephen [4] => 21 [6] => [8] => kingkong [10] => 1000 [12] => )
after using

Code: Select all

strip_tags
. Which is as much use as a dead, uncooked horse to me. I have covered changing key values in the past but it's as clear as being in infant school at the moment. Can somebody show me the light please?

Stephen,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

desired output?

array_values() may be of interest.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

That was of great interest.
Post Reply