473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

array_multisort syntax

Hi,

I have a table loaded in an array like so :

$table[0][ID] $table[0][text] $table[0][text2]
$table[1][ID] $table[1][text] $table[1][text2]
$table[2][ID] $table[2][text] $table[2][text2]
......

now I want to sort this table using the ID column.

I can't seem to find the exact syntax for this.
Any suggestions ??
thx

Ward

Jul 16 '05 #1
1 2632
Ward Germonpé wrote:
Hi,

I have a table loaded in an array like so :

$table[0][ID] $table[0][text] $table[0][text2]
$table[1][ID] $table[1][text] $table[1][text2]
$table[2][ID] $table[2][text] $table[2][text2]
.....

now I want to sort this table using the ID column.
Hi,

Forgive me if I'm wrong, but I think you just want to do:

sort($table);

I think will sort by the first element if you have an array of arrays
such as this.

Suck it and see.

MK.
I can't seem to find the exact syntax for this.
Any suggestions ??
thx

Ward


--
MeerKat

Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: michael nieuwenhuizen | last post by:
<newbie alert> i have 2 related arrays that i wanna sort at once. if i try: print_r($my_array1); array_multisort($my_array1, SORT_ASC, $my_array2, SORT_ASC); print_r($my_array1); both...
5
by: Frostillicus | last post by:
I'm trying to use array_multisort to sort by one of the dimensions of an array stored in $GLOBALS like this: array_multisort($GLOBALS, SORT_STRING, SORT_DESC); Each "row" in $GLOBALS contains...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
14
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
0
by: R | last post by:
Hi All, I have simple question can array_multisort be made locale based sort for SORT_STRING flag? or is there a work around to force strcoll when sorting strings? thanks in advance for any...
3
by: Schraalhans Keukenmeester | last post by:
I'm having a hard time getting to grips with this function. I have an array shaped like this: $dircontents ='index.html' $dircontents = 'www' $dircontents = 'www' $dircontents = 'file' ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.