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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

Display a default image
I am trying to display generic image for items that don't have one, but I can't get it to display.

User information
Hi All,
By using t-code SUIM we get all the user details,if suppose we donot have permission t

cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a d

reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

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