What's that function?

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
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

What's that function?

Post by evilmonkey »

I'm sufferring I bad case of mental block. I need the PHP function that will order my keys in a normal numeric order. For instance:
$array[0] = "stuff"
$array[2] = "stuff1"
$array[3] = "stuff2"
$array[5] = "stuff3"

and I need

$array[0] = "stuff"
$array[1] = "stuff1"
$array[2] = "stuff2"
$array[3] = "stuff3"

Thanks. Sorry to litter the board with this. :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

Wasn't what I was thinking of, but it did the trick. Thanks. :)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

you're probably thinking of sort() or asort(), or one of the functions that sorts arrays
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply