Hi,
I'm looking for help with my description meta.
I have set it for a maximum length of 150 characters which works fine, but does anybody know how I can set it so that it stops after the first white space after 150 characters ie so that only full words are shown.
The code I am using is below:
$result = mysql_query("SELECT * FROM database WHERE id = 7573");
while ($row = mysql_fetch_array($result)) {
echo "<HTML>\n";
echo "<HEAD>\n";
echo "<title>".$row{'Name'}.", ".$row{'Location'}.", ".$row{'Country'}.\"</title>\n";
[B]echo "<meta name=\"description\" content=\"".$row{'Name'}." - ". substr($row['Description'],0,150) ."\">\n";[/B]
echo "</head>\n";
Thanks for your help