Move array index to end


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

Hey guys,
Quick question:

I have an array that looks like this:
Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]$var = array(
'name' => 'thename',
'title' => 'thetitle',
'media' => 'themedia'
);

and I need to move the 'name' index to the end. Like so:
Code: [Select]$var = array(
'title' => 'thetitle',
'media' => 'themedia',
'name' => 'thename'
);

How do I do that?
No comments posted yet

Your Answer:

Login to answer
297 Like 5 Dislike
Previous forums Next forums
Other forums

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.

So this would write 2232 a

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

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

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

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

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

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