I have the following query:
<?php
$query="SELECT * FROM table LIMIT 4";
$result=mysql_query($query);
echo "<tr>";
for($i=1;$i<mysql_num_fields($result);$i++)
{
echo "<th style='height: 10px; padding: 0px;'>";
echo mysql_field_name($result, $i);
echo "</th>";
}
while($row=mysql_fetch_row($result))
{
echo "<tr>";
for($j=1;$j<$i;$j++)
{
echo "<td style='height: 10px; padding: 0px;'>";
echo $row[$j];
echo "</td>";
}
echo "</tr>";
}
echo "</tr>";
?>
What I am trying to do is echo a URL from the database. I have added the URL into the database as <a href="http://somesite.com">Some Site</a>. It echoes the URL but cuts it off, for some reason it only gives me the first 7 characters of the displayed link. For example, the echoed URL would be "Some Si". Could someone please tell me what I am doing wrong? I also want to mention that the field contains additional text besides the URL. Thanks.