Php show 50% of message?

How can I check the amount of charecters message contain and then show 50% of it?

Count the characters using strlen.

Then substr it at half that value.

Should be able to work it out with these two functions :slight_smile: .

Unless you’re working with UTF8, in which case you will be wanting the multi-byte versions:


1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.