What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Coding: swapping items in a row

Coding: swapping items in a row
Author: Message:
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: Coding: swapping items in a row
code:
function swap($arr,$key1,$key2)
{
$foo = $arr[$key1];
$arr[$key1] = $arr[$key2];
$arr[$key2] = $foo;

return $arr;
}

That's how I'd do it... I'd say that's fairly simple too.
07-11-2004 06:30 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Coding: swapping items in a row - by KeyStorm on 07-11-2004 at 06:25 PM
RE: Coding: swapping items in a row - by fluffy_lobster on 07-11-2004 at 06:30 PM
RE: Coding: swapping items in a row - by KeyStorm on 07-11-2004 at 08:48 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On