getting mysql stored url's to show as hyperlinks in a table
Posted: Tue Apr 20, 2004 2:24 pm
I have a mysql database of which one field contains lots of url's
I am trying to write php code to display the url's eg...
Product, details, Click Here (which is a hyperlink to http://www.... etc)
Here is the code I was using...
$count = 1;
print "table settings/columns/headings etc etc"
while ($row = mysql_fetch_assoc($r)) {
$data .= "<tr>";
$data .= "<td>" .$row['product']."</font>";
$data .= "<td>" .$row['details']."</font>";
$data .= "<td><a href=\".$row['url'].\">"Click here</a></font></td>";
$count++;
}
}
data .="<table>";
echo $data;
I know the method i am using is wrong, but for info here is the error message I get...
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
But does anyone know a work around for this ?
Cheers
I am trying to write php code to display the url's eg...
Product, details, Click Here (which is a hyperlink to http://www.... etc)
Here is the code I was using...
$count = 1;
print "table settings/columns/headings etc etc"
while ($row = mysql_fetch_assoc($r)) {
$data .= "<tr>";
$data .= "<td>" .$row['product']."</font>";
$data .= "<td>" .$row['details']."</font>";
$data .= "<td><a href=\".$row['url'].\">"Click here</a></font></td>";
$count++;
}
}
data .="<table>";
echo $data;
I know the method i am using is wrong, but for info here is the error message I get...
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
But does anyone know a work around for this ?
Cheers