I've bought a script that uses a database to for elements like the page site, meta tags etc. The problem is that when the data is added to the page a space or two is also added. The script is using
<?php echo siteinfo("sitetitle");?>
to add the data to the page, but I also found this function:
function siteinfo($att)
{
include("linkmysql.php");
$att=mysql_real_escape_string($att);
$query="Select value from settings where attribute='$att'";
if ($q=mysql_query($query,$link))
if ($r=mysql_fetch_array($q))
{
$r[0]=stripslashes($r[0]);
return $r[0];
}
return FALSE;
}
yet I can't work out how it's adding the space and how to remove it so would be grateful for any help. I've checked the database and the space isn't there so it's only being added when the code is added to the page.
Thanks
<title> <?php echo ... ; ?> </title>you're gonna have spaces there; either that or there are spaces in the database... those are the 2 most obvious cases anyway.siteinfo()and the output?