Forum Moderators: coopster
Here is the code as I figured it should look.
$mail['shortsubject'] = trimtext($mail['subject'], 36) && ucfirst($mail['subject']) && strtolower($mail['subject']);
John
$mail['shortsubject'] = substr(ucwords($mail['subject']),0,36);
$mail['shortsubject'] = ucwords(strtolower(substr($mail['subject'], 0, 36)));
is also what I came up with.
I will try these out and post in a minute or two if they work, thanks for the quick replies! :)
How can I add three dots at the end of the string?
Thanks for ALL the suggestions. :)
$mail['shortsubject'] = ucwords(strtolower(substr($mail['subject'], 0, 36))) . ' ...';
Regards, R.