...

View Full Version : sorting string



john_zakaria
10-29-2009, 02:04 PM
now i have a string

$_SESSION['oids']="abc,def,ghi,jkl,pqr,mno,stu";
i want to sort this session to be
"abc,def,ghi,jkl,mno,pqr,stu";
i want to sort the string value according to the comma.

plz i need help quickly

tomws
10-29-2009, 02:13 PM
Explode (http://php.net/explode) it into an array, sort (http://php.net/sort), then implode (http://php.net/implode) it back into a string.

karlosio
10-29-2009, 05:13 PM
plz i need help quickly

Why do you need it quickly?

Fumigator
10-29-2009, 05:39 PM
Why do you need it quickly?

He's McGruber (http://en.wikipedia.org/wiki/MacGruber) and there's a bomb that is going to explode in 10 seconds if he doesn't get this code figured out!

karlosio
10-29-2009, 06:55 PM
Lmao!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum