Hi Guys,
I have the following code at the beginning of a php page:
<?
if(!$id) $id = 1;
include( "connect.php" );
$query1 = "SELECT CatID, CatDescription, CatName, Info, suburb FROM categories WHERE CatID='$id'";
$result1 = mysql_query($query1);
while($row = mysql_fetch_array($result1)){
?>
<HTML><head>
<title><? echo $row['CatName']?> - Only Melbourne</title>
<meta name="description" content="<? echo $row['Info']?>">
<meta name="keywords" content="Melbourne, melborne, <? echo $row['CatName']?>, <? echo $row['suburb']?>, hello,">
<meta name="robots" content="index,follow">
<?
}
?>
The problem is that if there are any HTML tags used in the Info field of the DB the page becomes distorted. Is there a way of stripping the HTML so that the META description for the value "Info" is normal?
Cheers,
micmac