Custom array sort? asc then desc


Posted on 16th Feb 2014 07:03 pm by admin

Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no idea how...

Each entry is laid out like this: ("$status||$id||$shop||$name||$date")
I want it to sort as $status Ascending, and $id Descending.

The reason I can't order it from the database to begin with, is because the entries come from more than one database. So ID's go into the array as 4 3 2 1, next database 4 3 2 1, and so on

No comments posted yet

Your Answer:

Login to answer
100 Like 23 Dislike
Previous forums Next forums
Other forums

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

[newb] Image hosting help.
Hey there, I'm new to php, I know some basics and i can code PWN, I'm only 14 but I'm interested in

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash