I need to remove words from string, if they’re longer than 20 characters. I’ve tried this but it only adds line breaks.
wordwrap($line,30,"",true);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code above removes everything longer than 5 consecutive non-space characters. Replace 5 with 30 and you’ll get what you want