php How to limit words in a search box? I want limit words within 30 words and do not broken the phrase.
I think it should combine strlen and explode, but how to? and how to notice the custom when he is typing words?
Thanks.
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.
That’s javascript related not PHP.
You may want to use jQuery and attach an onChange event.
If you need the PHP script it’s: