I have a goofy issue that I'm not sure if PHP can handle:
I have a field coming from a MYSQL database which can have a length up to 100 characters.
I am displaying the field in a column, and if the field is too long, I want to chop it off and add "..." after it.
The code below works, but the problem is, depending on what characters are in the field, the "actual" length on the page can vary
example:
"this is simple testing"
"why we walking weirddd"
both have 22 characters, but obviously the second stretches farther to the right.
I need to find a way to check each "actual width" if possible.
Anyone have any thoughts? Thanks
$event_title_length = strlen($event_title);
if($event_title_length > 35){$event_title=substr($event_title,0,32).'...';