On 2/28/2011 7:52 PM, Ron Piggott wrote:
I need help to know how to sort the words / phrases in my array.
Variable name: $words_used
print_r( $words_used ); Current output: Array ( [187] = Sin [249] =
Punished [98] = Sanctuary [596] = Sing [362] = Anointing Oil )
Desired result:
I need help to know how to sort the words / phrases in my array.
Variable name: $words_used
print_r( $words_used ); Current output: Array ( [187] = Sin [249] = Punished
[98] = Sanctuary [596] = Sing [362] = Anointing Oil )
Desired result: Alphabetical sort: Array ( [362] = Anointing Oil [249] =
On 1/03/2011, at 4:52 PM, Ron Piggott wrote:
I need help to know how to sort the words / phrases in my array.
Variable name: $words_used
print_r( $words_used ); Current output: Array ( [187] = Sin [249] =
Punished [98] = Sanctuary [596] = Sing [362] = Anointing Oil )
Desired result:
Hey everyone. I have an array that looks like this:
$main_array[0] = array('key1' = 'vala');
$main_array[1] = array('key1' = 'valb');
etc.
I want to sort the main array based on the value of key1 for each
sub-array. I looked at all the array sorting functions, but unless I
misunderstood
On Sun, Sep 6, 2009 at 6:45 PM, James Colanninoja...@colannino.org wrote:
Hey everyone. I have an array that looks like this:
$main_array[0] = array('key1' = 'vala');
$main_array[1] = array('key1' = 'valb');
etc.
I want to sort the main array based on the value of key1 for each
sub-array.
Eddie Drapkin wrote:
http://us3.php.net/uasort
Exactly what I was looking for. Thanks.
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yep, that would be the perfect solution, but, unfortunately, database
is not an option for this project. Thanks for looking! I did get a
solution though from another list.
Here is a working version:
http://veanndesign.com/sorting.php
compare it to the not working one:
If you are going to sort it by various fields, I'd just throw it into
a database...
That said, http://php.net/usort should be able to do whatever you want.
On Thu, May 10, 2007 2:18 pm, Anna Vester wrote:
Hello all,
I have a question concerning .CSV array sorting. I have tried googling
for
Hello all,
I have a question concerning .CSV array sorting. I have tried googling
for an answer and have tried different techniques, but nothing seems
to works as I would like it to work. Here is my situation:
Test file is located here: http://veanndesign.com/test.php
I would like to be able to
One place to start reading, Anna, would be the PHP manual for the
fgetcsv() function, which is specifically for CSV parsing.
http://www.php.net/fgetcsv
On 5/10/07, Anna Vester [EMAIL PROTECTED] wrote:
Hello all,
I have a question concerning .CSV array sorting. I have tried googling
for
On 5/10/07, Daniel Brown [EMAIL PROTECTED] wrote:
One place to start reading, Anna, would be the PHP manual for the
fgetcsv() function, which is specifically for CSV parsing.
http://www.php.net/fgetcsv
Thanks for your quick reply Daniel. Yes I've seen that function before
and i am
When you load your data into your array, you can use the timezone (or whatever
field you're using to sort) as the array key, then use ksort().
Check the see also for a bunch of other types of sorting you can do.
When it comes to the multisorts and user defined sorts, I'm at a bit of a
hi,
I have the following array, which I need to sort by quantity...
Array
(
[2408] = Array
(
[name] = Havaianas Top Pink Crystal
[size] = 5 (37/38)
[quantity] = 4
)
[3388] = Array
(
[name] = Havaianas Brazil Silver
Jon, I would suggest that you should have a look at the function
array_multisort. See the manual for details on what this function
is capable of.
//frank
25 apr 2007 kl. 01.58 skrev Jon Bennett:
hi,
I have the following array, which I need to sort by quantity...
Array
(
[2408] = Array
I have the following array, which I need to sort by quantity...
I need to keep the indexes if poss.
This may not be the most elegant solution. Let's call your array
$origArray
$tmpArray = array();
foreach( $origArray as $elKey = $elArray ) {
$tmpArray[$elArray['quantity']] = $elKey;
}
if(
2007. 04. 25, szerda keltezéssel 11.39-kor Chris Boget ezt írta:
I have the following array, which I need to sort by quantity...
I need to keep the indexes if poss.
This may not be the most elegant solution. Let's call your array
$origArray
$tmpArray = array();
foreach( $origArray as
this won't work if he has the same quantity for several keys, I think
Yes, you are correct. If that is the case, then you would just need to
change the following line
$tmpArray[$elArray['quantity']] = $elKey;
to
$tmpArray[$elArray['quantity']][] = $elKey;
then change logic in this loop:
array_multisort accepts column arrays but here you try to sort row based
arrays.
try this:
?
class ArrayUtility
{
/* Sorts an array by a member */
static private $sortMember;
static function sortByMember($array, $member)
{
self::$sortMember = $member;
Jon Bennett wrote:
hi,
I have the following array, which I need to sort by quantity...
Array
(
[2408] = Array
(
[name] = Havaianas Top Pink Crystal
[size] = 5 (37/38)
[quantity] = 4
)
[3388] = Array
(
[name] = Havaianas
Search the archives for multisort array and you should find this
thread a few thousand times...
On Tue, April 24, 2007 6:58 pm, Jon Bennett wrote:
hi,
I have the following array, which I need to sort by quantity...
Array
(
[2408] = Array
(
[name] = Havaianas Top
On Tue, October 31, 2006 11:10 am, Keith Spiller wrote:
RE: Sorting Multidimensional Array
I'm trying to sort a multidimensional array. The data was taken from
a mysql query:
$myrow = mysql_fetch_row($result) {
query[] = $myrow;
}
The purpose is to retrieve the table data and
Subject: Re: [PHP] Sorting Multidimensional Array
On Tue, October 31, 2006 11:10 am, Keith Spiller wrote:
RE: Sorting Multidimensional Array
I'm trying to sort a multidimensional array. The data was taken from
a mysql query:
$myrow = mysql_fetch_row($result) {
query[] = $myrow
Hi,
RE: Sorting Multidimensional Array
I'm trying to sort a multidimensional array. The data was taken from
a mysql query:
$myrow = mysql_fetch_row($result) {
query[] = $myrow;
}
The purpose is to retrieve the table data and manually add a record,
then sort ASC by the startdate which is
;
}
-Original Message-
From: weetat [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 12:32 PM
To: php-general@lists.php.net
Subject: [PHP] sorting in array
Hi all ,
I have array value as shown below, i have paste my test php code
below:
I have problem when doing usort() when 'country
Message-
From: weetat [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 12:32 PM
To: php-general@lists.php.net
Subject: [PHP] sorting in array
Hi all ,
I have array value as shown below, i have paste my test php code below:
I have problem when doing usort() when 'country' = '', i would
At 10:31 PM 7/30/2006, weetat wrote:
I have problem when doing usort() when 'country' = '', i would
like to display records where country = '' last. Any ideas how to do that ?
...
$arraytest= array(
array
(
'country' = '',
)
,
array
(
At 05:40 PM 7/30/2006, Peter Lauri wrote:
function cmpcountry($a, $b)
{
$country1 = $a['country'];
$country2 = $b['country'];
if($country1=='') return 1;
else return ($country1 $country2) ? -1 : 1;
}
Good call, Peter; my suggestion was
At 12:22 AM 7/31/2006, Paul Novitski wrote:
I could make that last statement just a bit simpler:
function cmpcountry($a, $b)
{
$country1 = ($a['country'] == '') ? zzz : $a['country'];
$country2 = ($b['country'] == '') ? zzz : $b['country'];
return ($country1
Thanks Paul,
Very weird tried Peter's option, it doesn't work.
Btw , how to sort by ascending ?
Thanks
Paul Novitski wrote:
At 12:22 AM 7/31/2006, Paul Novitski wrote:
I could make that last statement just a bit simpler:
function cmpcountry($a, $b)
{
$country1 =
At 01:14 AM 7/31/2006, weetat wrote:
Thanks Paul,
Very weird tried Peter's option, it doesn't work.
Btw , how to sort by ascending ?
Please explain what you mean. The current script DOES sort ascending
by country (except for the blank country fields which are placed at the end):
: Re: [PHP] sorting in array
Thanks Paul,
Very weird tried Peter's option, it doesn't work.
Btw , how to sort by ascending ?
Thanks
Paul Novitski wrote:
At 12:22 AM 7/31/2006, Paul Novitski wrote:
I could make that last statement just a bit simpler:
function cmpcountry($a, $b
@lists.php.net
Subject: Re: [PHP] sorting in array
At 10:31 PM 7/30/2006, weetat wrote:
I have problem when doing usort() when 'country' = '', i would
like to display records where country = '' last. Any ideas how to do that
?
...
$arraytest= array(
array
weetat wrote:
Hi all ,
I have array value as shown below, i have paste my test php code below:
I have problem when doing usort() when 'country' = '', i would like to
display records where country = '' last. Any ideas how to do that ?
...
You might try searching the list's archive's.
Hi all ,
I have array value as shown below, i have paste my test php code below:
I have problem when doing usort() when 'country' = '', i would like to
display records where country = '' last. Any ideas how to do that ?
Thanks
$arraytest= array(
array
(
'country'
31, 2006 12:32 PM
To: php-general@lists.php.net
Subject: [PHP] sorting in array
Hi all ,
I have array value as shown below, i have paste my test php code below:
I have problem when doing usort() when 'country' = '', i would like to
display records where country = '' last. Any ideas how to do
Hi,
How about this
foreach ($data as $key = $row) {
$scores[$key] = $row['scores'];
}
array_multisort($scores, SORT_ASC, $data);
Abdul-Wahid
On Mon, 24 Jan 2005 00:39:17 +1100, Jeffery Fernandez
[EMAIL PROTECTED] wrote:
I have the following multi-dimentional
...
This won't work for me as I have 500+ records to sort based on the
score key.. looking at jochem's class now. Thanks
which wont help much - assuming what you say is true
(why wont it work? have you tried it).
sort method from the class:
function sort()
{
Jochem Maas wrote:
...
This won't work for me as I have 500+ records to sort based on the
score key.. looking at jochem's class now. Thanks
which wont help much - assuming what you say is true
(why wont it work? have you tried it).
sort method from the class:
function sort()
{
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 23 January 2005 22:37, Jeffery Fernandez wrote:
Kurt Yoder wrote:
Use usort (stealing from php docs):
function cmp($a['score'], $b['score'])
That should be:
Jeffery Fernandez wrote:
Jochem Maas wrote:
...
Yes the example sent by Kurt Yoder worked for me. I coudn't work out the
errors with the class you sent me. I realised it was written for PHP5 in
mind ?... or maybe I wasn't patient enough to spent time debugging it :-(
I did change it for
Jochem Maas wrote:
Jeffery Fernandez wrote:
Jochem Maas wrote:
...
Yes the example sent by Kurt Yoder worked for me. I coudn't work out
the errors with the class you sent me. I realised it was written for
PHP5 in mind ?... or maybe I wasn't patient enough to spent time
debugging it :-(
I
I have the following multi-dimentional array and I want to sort it by
the score key value
print_r($data);
Array
(
[0] = Array
(
[video_id] = 71
[old_id] = 7854
[title] = When the fire comes
[video_copies] = 1
[running_time] = 48
Jeffery Fernandez wrote:
I have the following multi-dimentional array and I want to sort it by
the score key value
...
any ideas. Thanks
A long time ago I had this problem, came up with the following class (based
on
someone else's stuff that I found in the comments section of the php manual) to
Use usort (stealing from php docs):
function cmp($a['score'], $b['score'])
{
if ($a['score'] == $b['score']) {
return 0;
}
return ($a['score'] $b['score']) ? -1 : 1;
}
$data = array(...);
usort($data, cmp);
On Jan 23, 2005, at 8:39 AM, Jeffery Fernandez wrote:
I have the
Kurt Yoder wrote:
Use usort (stealing from php docs):
function cmp($a['score'], $b['score'])
{
if ($a['score'] == $b['score']) {
return 0;
}
return ($a['score'] $b['score']) ? -1 : 1;
}
$data = array(...);
usort($data, cmp);
This won't work for me as I have 500+ records to sort
Jeffery Fernandez wrote:
Kurt Yoder wrote:
Use usort (stealing from php docs):
function cmp($a['score'], $b['score'])
{
if ($a['score'] == $b['score']) {
return 0;
}
return ($a['score'] $b['score']) ? -1 : 1;
}
$data = array(...);
usort($data, cmp);
This won't work for me as I
Jochem Maas wrote:
Jeffery Fernandez wrote:
Kurt Yoder wrote:
Use usort (stealing from php docs):
function cmp($a['score'], $b['score'])
{
if ($a['score'] == $b['score']) {
return 0;
}
return ($a['score'] $b['score']) ? -1 : 1;
}
$data = array(...);
usort($data, cmp);
This won't
Best groupmember,
I have an multidim array that looks something like this:
[40] = [1]=32, [2]=55, [total]=87
[22] = [8]=2, [7]=105, [total]=107
[142] = [2]=3, [7]=8, [total]=11
I want to sort this array according to the total and still keep the acc.
with the basekey. I know I can easily do this
Best groupmember,
I have an multidim array that looks something like this:
[40] = [1]=32, [2]=55, [total]=87
[22] = [8]=2, [7]=105, [total]=107
[142] = [2]=3, [7]=8, [total]=11
I want to sort this array according to the total and still keep the acc.
with the basekey. I know I can easily do this
I have an array $links like this:
[1] = Array
(
[href] = http://www.poetrymagazine.org/epstein_sept_prose.html
[description] = Thank You, No
[time] = 2004-09-17T17:30:32Z
)
[2] = Array
(
[href] =
http://ca3.php.net/manual/en/function.array-multisort.php
this might do it.
Jason
Chris Lott [EMAIL PROTECTED] wrote:
I have an array $links like this:
[1] = Array
(
[href] = http://www.poetrymagazine.org/epstein_sept_prose.html
[description] = Thank
I'd like to sort the array based on one of the values in the field
href, description, or time. Is there a canonical way of doing this?
Probably easiest to write your own sort function the use usort(),
http://www.php.net/usort has pretty good documentation on how to
accomplish this.
Steve
--
I'd like to sort the array based on one of the values in the field
href, description, or time. Is there a canonical way of doing this?
you might be able to use http://us2.php.net/manual/en/function.usort.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
This one time, at band camp, PHP Gen [EMAIL PROTECTED] wrote:
Hi,
I have a function that reads jpg files (thumbnails)
from a directory and puts all the files names into an
array...I want to sort that array by the filename,
problem is, I dont know if filenames will be pure
numeric (eg
Hi,
I have a function that reads jpg files (thumbnails)
from a directory and puts all the files names into an
array...I want to sort that array by the filename,
problem is, I dont know if filenames will be pure
numeric (eg 001.jpg,002.jpg) or alpha-numeric
(asdf001,asdf002)
It HAS to be
* Thus wrote PHP Gen:
...
Looking in the manual I have tried sort() without any
luck, then looking further I found natcasesort() which
would be perfect for my needs right now, but cant get
it to work :-(
Below is the function (its not big)
*** Start function
Hi Curt,
Damn, looks like I (unintentionally) gave you guys
quite a challenge! You're the first one to reply and
looks like you sure worked on it!
For starters, if your going to provide some code,
make sure its
readable by others.. trying to figure out what it is
doing is
nearly impossible
Okay, I know someone is going to shoot me for asking such a dumb
question, but I just can't seem to find the answer anywhere. I have a
multidimensional array which I would like to sort on the value of one of
the keys...
Array
(
[0] = Array
(
[foo] = blah
On Wed, 2004-06-02 at 12:59, John Nichel wrote:
Okay, I know someone is going to shoot me for asking such a dumb
question, but I just can't seem to find the answer anywhere. I have a
multidimensional array which I would like to sort on the value of one of
the keys...
Array
(
[0]
[snip]
What I would like to do is sort this on the value of 'sort' in each
sub-array. What am I missing TIA
[/snip]
http://us4.php.net/manual/en/function.array-multisort.php
HTH! :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robert Cummings wrote:
On Wed, 2004-06-02 at 12:59, John Nichel wrote:
What I would like to do is sort this on the value of 'sort' in each
sub-array. What am I missing TIA
usort( $theAboveArray, 'mySortHandler' );
function mySortHandler( $v1, $v2 )
{
if( $v1['sort'] $v2['sort'] )
There is an array of regexes, for example
$array = array('moon', '[wh]ood', '[^as]eed' ...
(about 300 entries).
I want to sort it comparing to the
character lenght of a regex. For example
[wh]ood is 4 characters, moon is 4 characters.
There are only letters of the alphabet
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote:
:
: There is an array of regexes, for example
:
: $array = array('moon', '[wh]ood', '[^as]eed' ...
: (about 300 entries).
:
: I want to sort it comparing to the
: character lenght of a regex. For
-Oorspronkelijk bericht-
Van: Eugene Lee [mailto:[EMAIL PROTECTED]
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka
Gasiorowski FNORD wrote:
:
: There is an array of regexes, for example
:
: $array = array('moon', '[wh]ood', '[^as]eed' ...
: (about 300 entries).
:
Eugene Lee wrote:
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote:
:
: There is an array of regexes, for example
:
: $array = array('moon', '[wh]ood', '[^as]eed' ...
: (about 300 entries).
:
: I want to sort it comparing to the
:
* Thus wrote Adam i Agnieszka Gasiorowski FNORD ([EMAIL PROTECTED]):
Eugene Lee wrote:
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote:
:
: There is an array of regexes, for example
:
: $array = array('moon', '[wh]ood', '[^as]eed' ...
:
On Tue, Nov 18, 2003 at 01:52:39PM +0100, Wouter van Vliet wrote:
: Eugene Lee suggested:
: On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka
: Gasiorowski FNORD wrote:
: :
: : There is an array of regexes, for example
: :
: : $array = array('moon', '[wh]ood', '[^as]eed' ...
: :
Curt Zirzow wrote:
* Thus wrote Adam i Agnieszka Gasiorowski FNORD ([EMAIL PROTECTED]):
Eugene Lee wrote:
On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD
wrote:
:
: There is an array of regexes, for example
:
: $array = array('moon',
Hey all -
I've been scouring the php.net site for a few hours now trying to find a
viable way to sort a single dimensional array( array('0'='fddfsdsfdds',
'1'=','d','2' = 'gofofle'); ). so that the longest lengthed
item is at the top, and the smallest lengthed item is at the bottom
On Wed, 22 Oct 2003 11:21:13 -0700, you wrote:
I've been scouring the php.net site for a few hours now trying to find a
viable way to sort a single dimensional array( array('0'='fddfsdsfdds',
'1'=','d','2' = 'gofofle'); ). so that the longest lengthed
item is at the top, and the
hello,
i have got a problem, tehere is an array:
$x = array(
array(15,55,array(1,2,3),3,5,array(1,2,5)),
array(25,55,array(1,2,3),3,5,array(1,2,5)),
array(5,55,array(1,2,3),3,5,array(1,2,5))
);
and I need to sort this arraybz first item of sub-arrays (x[0][0],
$x[1][0], $x[2][0]).
www.php.net/usort - slight modification of the example (hint: add [0] to
$a and $b).
Ji Nmec wrote:
hello,
i have got a problem, tehere is an array:
$x = array(
array(15,55,array(1,2,3),3,5,array(1,2,5)),
array(25,55,array(1,2,3),3,5,array(1,2,5)),
Hi , I am trying to sort this:
array[numrooms] = Array ( [3] = 2 [2] = 5 [1] = 1 )
I want to get a result like this:
2=5
3=2
1=1
( I want the keys to stay attached to the results)
I used this to sort it :
array_multisort ($request_array['numrooms'], SORT_NUMERIC, SORT_DESC);
but instead I get
perhaps asort()?
This function sorts an array such that array indices maintain their
correlation with the array elements they are associated with.
--- Diana Castillo [EMAIL PROTECTED] wrote:
Hi , I am trying to sort this:
array[numrooms] = Array ( [3] = 2 [2] = 5 [1] = 1 )
I want to get a
array[numrooms] = Array ( [3] = 2 [2] = 5 [1] = 1 )
I want to get a result like this:
2=5
3=2
1=1
( I want the keys to stay attached to the results)
perhaps asort()?
This function sorts an array such that array indices maintain their
correlation with the array elements they are
I am having problems sorting a multi-dimensional array. I am hoping that
somebody can help me figure out what I am doing wrong. It should sort on
the field than on the fac. Here is my code:
-start code-
$sortterm;
get_locations();
function cmp ($a, $b) {
GLOBAL $sortterm;
return
Hello,
Here's what i'm working with.
I'm figuring the distance between to points based on
latitude and longitude.
while ($row = mysql_fetch_array($result))
{
//calculate distance between the two cities.
$Lat2 = $row[Latitude];
$Lon2 = $row[Longitude];
$x = 69.1
]
To: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 8:51 AM
Subject: [PHP] Sorting an array.
Hello,
Here's what i'm working with.
I'm figuring the distance between to points based on
latitude and longitude.
while ($row = mysql_fetch_array($result))
{
file://calculate distance between the two cities
Sounds like it'd be a lot easier to let MySQL do the calculation and
sorting.
$userLatitude = 50;
$userLongitude = 70;
$sql = select companyname, blah, blah,
ceiling(sqrt(pow(69.1 * (latitude - $userLatitude), 2) +
pow(53 * (longitude - $userLongitude), 2))) as distance
What I am trying to do is sort a array of arrays but I want to sort by one
of the pieces of data stored in the arrays inside the array. For example;
$data[blue] = array(name, age, time, 3);
$data[green] = array(name, age, time, 7);
$data[red] = array(name, age, time, 6);
$data[yellow] =
Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948
-Original Message-
From: Fifield, Mike [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 9:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Sorting an array of arrays
What I am trying to do is sort a array of arrays but I
: RE: [PHP] Sorting an array of arrays
Good day,
uasort() should do what you need.
http://www.php.net/manual/en/function.uasort.php
There's an example for the usort function that does something similar to
what you want, in fact.
Darren Gamble
Planner, Regional
On Thu, 2002-02-14 at 08:26, Fifield, Mike wrote:
What I am trying to do is sort a array of arrays but I want to sort by one
of the pieces of data stored in the arrays inside the array. For example;
$data[blue] = array(name, age, time, 3);
$data[green] = array(name, age, time, 7);
$data[red]
try to add to your script:
function cmp ($a, $b) {
return strcmp($a[3],$b[3]);
}
usort($data, cmp);
Fifield, Mike [EMAIL PROTECTED] wrote: What I am trying to do is sort a
array of arrays but I want to sort by one
of the pieces of data stored in the arrays inside the array. For example;
I have a 2 dimensional array...with the second dimension having
12 elements. What I want to do is sort (and re-sort) they array
by one of the 12 elements...keeping data consistent.
All of the examples I have read @php.net seem to deal with
multidim-arrays that only have one element in them.
Hi,
Is it possible to sort a class array using array multisort, I have two items
in each class that I wish to sort by, one is a text and the other is the
first item in an array within within each class. i.e.;-
$class[$index]-text;
$class[$index]-array[0];
how can I do this?
thanks in advance
On Wed, Oct 24, 2001 at 10:43:53AM +0100, L Melville wrote:
Is it possible to sort a class array using array multisort, I have two items
in each class that I wish to sort by, one is a text and the other is the
first item in an array within within each class. i.e.;-
$class[$index]-text;
I'm trying to sort a listing of albums alphabetically
for LyricsList.com, the problem is that I want the
initial 'The' and 'A' in some albums (A Hard Days
Night, The Wall) to be ignored. So that the list will
look like:
Abbey Road
Dark Side Of the Moon
The Final Cut
A Hard Days Night
Kill
Hi!
I have an array that looks kinda like this:
NAMEADDRESS
John DoeSome Street 1
Jane DoeAnother Street 2
Bill Gates Helsinki 666
How do I sort this array based on NAME? ADDRESS?
Thanks!!
- Nicklas
--
PHP General Mailing List (http://www.php.net/)
To
Nicklas af Ekenstam wrote:
Hi!
I have an array that looks kinda like this:
NAMEADDRESS
John DoeSome Street 1
Jane DoeAnother Street 2
Bill Gates Helsinki 666
How do I sort this array based on NAME? ADDRESS?
90 matches
Mail list logo