I am trying to strip tags from HTML in a MySQL database to plain text for an SEO Meta Description. The HTML in the database looks like this:
<p>The Break-ezee is a vital piece of equipment for anyone when breaking horses - As used by Mary King.</p>
<p></p>
<p>The Break-ezee is an all in one progressive training product for use when breaking horses.</p>
I am using the following PHP to format it:
$showseodesc = trim(strip_tags(substr($showseoproduct['text'],0,160)));
This shows the following in the source of the site:
<meta name="description" content="The Break-ezee is a vital piece of equipment for anyone when breaking horses - As used by Mary King.
The Break-ezee is an all in one progressi" />
Is there any way I can replace any tags (in this case <p>) so there are no spaces?
I am ideally looking for the Meta Description to look like this:
<meta name="description" content="The Break-ezee is a vital piece of equipment for anyone when breaking horses - As used by Mary King. The Break-ezee is an all in one progressi" />
Also, am I correct in thinking Google doesn't pick up extra spaces for the Meta Description?