hansu
Programmer
- Mar 12, 2002
- 89
I am trying to insert a variable $row[link] that is stored in a MySQL-Database into a webpage. So far I have not been able to quote the string correctly at href=\" ...
I keep receiving the error: ...unexpected T_VARIABLE in ...
$result = mysql_query("select link, textde from links order by link"
;
while ( $row = mysql_fetch_array($result) ){
print("<tr valign=\"top\"><td><a href=\" . "$row["link"]" . \">" . $row["link"] . "</a></td><td class=\"text\">" . ereg_replace("(\n|\r)+","<br>",$row["textde"]) . "</td></tr>"
;
}
Thanks for your assistance.
Hansu
I keep receiving the error: ...unexpected T_VARIABLE in ...
$result = mysql_query("select link, textde from links order by link"
while ( $row = mysql_fetch_array($result) ){
print("<tr valign=\"top\"><td><a href=\" . "$row["link"]" . \">" . $row["link"] . "</a></td><td class=\"text\">" . ereg_replace("(\n|\r)+","<br>",$row["textde"]) . "</td></tr>"
}
Thanks for your assistance.
Hansu