Feb 21, 2010, 2:00 AM
Veteran / Moderator (17366 posts)
Feb 21, 2010, 2:00 AM
Post #2 of 3
Views: 374
Not sure what you mean? You want a global that will convert a string from "abbbb Bbbbb cbbbb" into "Abbbb Bbbbb Cbbbb" ... etc?
If so, try this:
lowercase_and_capatilize
Code:
sub {
my @string = split /\s+/, $_[0];
my @back;
foreach (@string) {
$_ = ucfirst(lc($_));
push @back, $_;
}
return join(" ", @back);
}
Then call with:
<%lowercase_and_capatilize($Description)%>
..or whatever field you want.
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work! Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500) Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins! Compare our different Plugin packages *new* Free CSS Templates