Help Ordering Arrays


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

Hi, I have 3 arrays as shown below.

Code: $users = $this->get_latest_users();
$flirt = $this->get_latest_flirts();
Did you know?Explore Trending and Topic pages for more stories like this.
$hotlist = $this->get_latest_hotlist();

These arrays for a key have the strtotime value of whenever something was posted. They then have some html as a value.

So..

Code: $users = array ('1257785194' => 'html');
What I need to do is merge the 3 above arrays and sort them so it shows the soonest first. The structure of arrays can be changed, thats not a problem. I just need to get this working. Any ideas?

EDIT: I need to preserve the strtotime value
No comments posted yet

Your Answer:

Login to answer
174 Like 20 Dislike
Previous forums Next forums
Other forums

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

Help with parsing this html
Hi,
I've got some html i just need a couple of strings from.. argh, it's freaking me out. I've t

regex for quoted text within a string
I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape q

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

does anyone know a php script to send mail using gmails/googles free smtp server
cause i heard u can do that but i dont know how

Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now

Scheduler problems related to execution of a single BLT by many schedules
Hello all,

We are running several MII instances in a distibuted architecture using a sing

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

passthru() help
Hi everyone,
I'm new to the forum and to PHP. I have some pretty good experience writing shell sc

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