Alphabetical order and the word "The"

5 posts by 3 authors in: Forums > CMS Builder
Last Post: April 29, 2010   (RSS)

By zip222 - April 29, 2010

Can anyone provide me some guidance on alphabetizing a list or organizations when some of them start with "The"? A manual sort is not really an option.

thanks.

Re: [zip222] Alphabetical order and the word "The"

By Dave - April 29, 2010

Hi Zip,

So you just want it sorted as if there was no "The " in the name? Is that correct? Any other special conditions? And can you give a short example of the sample sorting output you'd like to see?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Alphabetical order and the word "The"

By zip222 - April 29, 2010

There are no other special conditions. Here is the viewer code:

list($corporations_foundationsRecords, $corporations_foundationsMetaData) = getRecords(array(
'tableName' => 'corporations_foundations',
'allowSearch' => '0',
));


<?php foreach ($corporations_foundationsRecords as $record): ?>
<li><?php echo $record['organization_name'] ?>" /></li>
<?php endforeach ?>

Re: [Jason] Alphabetical order and the word "The"

By zip222 - April 29, 2010

That didn't quite work. it placed the records starting with "The" at the beginning of the list, even though they don't belong there.

But I figured out the problem. You also need to include the space after the "The", like this... 'The '

thanks!