Re: [mel] sorting a text box
Hi Mel,
I don't think that you can easily sort the words in a text box directly, but I've been proved wrong by the coding gurus at Interactive Tools before.
Is there a finite list of locations? How do the locations get entered into the text box. Are there any controls as to how that's done?
As far as trying to sort the text in a text box, you may be able to create an array out of the text using the PHP explode function
http://php.net/manual/en/function.explode.php Then you could try sorting the array alphabetically using the PHP sort function
http://php.net/manual/en/function.sort.phpI think that you'd have to put together some code to make sure that your location names are in a specific format, and I don't know how you would deal with multi-word location names, but it's an approach you could explore if you think it might work.
If you need more help you could go the consulting route
consulting@interactivetools.com. Consulting is usually fast and cost effective.
Best,
Jerry Kornbluth
[email]
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php