I am working on this piece of code that will take my string and make it 200 characters long and then after that remove the last white space so my string will look like this 'This is my' instead of 'This is my stri'
This is what I got thus far:
$description = substr($value['description'], 0, 200);
and now I want it to remove the last white space in the string. After googleing it, all I found was the php trim function, but nothing about removing the last one, just all..
any tips?