How do I format the links from a mysql query to show click here on my webpage.

$row (eg of reviewlink = http://www.abc.com)

I want this result to show in the html source code:

<a href="http://www.abc.com" >click here</a>

So the page shows click here and links to http://www.abc.com

I want the click here to show inside a table cell.

This does not work!
echo "<td>" . "<a href=$row>click here</a>" . "</td>";

This works but just shows the unclickable url
echo "<td>" . $row . "</td>";

What is the php echo statement that I have to use for this to work?

Thanks

Recommended Answers

All 2 Replies

echo "<a href=".$row['reviewlink'].">Click Here</a>";

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.