array index ordering
- From: Jeff <jeff@xxxxxxxxxxxxxxx>
- Date: Mon, 16 Jun 2008 09:45:40 -0400
Lets say we have an array:
$array[]='apples';
$array[]='orange';
$array[]='lemon';
echo $array[1]; // orange
Now, lets say we want to insert "grape", between apples and orange. How do we do that?
I have some memory of seeing a php shortcut to do this, but I can't find it now.
Also, I see there are a number of custom php functions for sorting (kudos on some of these). Is there a way to write your own sorting function?
Jeff
.
- Follow-Ups:
- Re: array index ordering
- From: Michael Fesser
- Re: array index ordering
- From: Captain Paralytic
- Re: array index ordering
- Prev by Date: Re: very basic: session_start();
- Next by Date: Re: array index ordering
- Previous by thread: Shared memory solution for PHP working from command line too
- Next by thread: Re: array index ordering
- Index(es):
Relevant Pages
|