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

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

Need help-Error istream header declaration
Hi Everyone ,

I am having issue with istream declaration. I am new to C programming.
can a

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu

unoconv doc convert to pdf code prob
PHP/5.3.1

Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. Howe

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

Need Help with a query
Hello,
For some reason I am just not getting the right answer when I do this query and not quite

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