php - automated meta description generation based on another defined variable -
On every page of your website, I have a variable defined as " description " I do And it can be either long or short, and I also want to use it for meta description .
I was seeing that I defined the additional length in my variable description variable, so it would fit properly in the meta description.
I can not say that I understand enough to develop a solution.
What am I trying to do, for example:
I have to reduce the last word of $ description
after 190 characters, and have to suffix the last word with "...". Do the following:
"Article is published on the Android website, it also likes you. Morbi ..."
and above To find a way to create an echo:
& lt ;? Php echo $ description truncated); ? & Gt;
You want to use the function. Document example:
& lt ;? Php echo mb_strimwidth ($ description, 0, 190, "..."); ? & Gt;
Comments
Post a Comment