logginn Posted May 2, 2007 Posted May 2, 2007 Hi, Does it possible obtain a function to clear html tags on my description. I want use 260 char of my description in the <meta description="MY PRODUCT DESCRIPTION NO HTML"> Thanks for your reponse
oschellas Posted May 2, 2007 Posted May 2, 2007 Something like this: substr(strip_tags($description), 0, 260);
bill110 Posted May 2, 2007 Posted May 2, 2007 This will remove special characters also: substr(preg_replace('[^a-zA-Z0-9]',' ',(strip_tags($name['$description']))),0,260); My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
logginn Posted May 2, 2007 Author Posted May 2, 2007 thanksss mate.. and which is the optimal length of meta description??
bill110 Posted May 2, 2007 Posted May 2, 2007 I read that google only reads the first 250 chars. Others read more. I guess ti's your decision. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
Recommended Posts
Archived
This topic is now archived and is closed to further replies.