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 d
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 php
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 sho
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()
{
if
...
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()
{
if(count($this->sortKe
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
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
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
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 sor
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 follo
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
11 matches
Mail list logo