i have a table in the database consists of three columns and 4 rows. And now i want to set hyperlink for each of the entity present in the 3rd column of the table in the database and display the output.
i tried printing the values of array as
echo "<td>", $row['a'], "</td><td>", $row['b'] ,"</td><td>", "<a href=\"http://foo/foo/".$row['link']."\">"."view"."</a>","</td>" ;?>
where a,b and link are the column name of 1,2 and 3 respectively. and i want to hyperlink the html pages. How can i do it? when i try to run my code, its goes to the folder http://foo/foo/
Remove the
echopart and just output as HTML. This way you don’t have to worry about all that messy concatenation (you’re using,instead of., which is valid, but in this context is unnecessary).