943,177 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 109
  • PHP RSS
Sep 3rd, 2010
0

How to show link from mysql query.

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

$row['reviewlink'] (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['reviewlink']>click here</a>" . "</td>";

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

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

Thanks
Last edited by tsteven; Sep 3rd, 2010 at 7:06 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tsteven is offline Offline
2 posts
since Sep 2010
Sep 3rd, 2010
0
Re: How to show link from mysql query.
php Syntax (Toggle Plain Text)
  1. echo "<a href=".$row['reviewlink'].">Click Here</a>";
Reputation Points: 210
Solved Threads: 228
Nearly a Posting Virtuoso
chrishea is offline Offline
1,389 posts
since Sep 2008
Sep 4th, 2010
0
Re: How to show link from mysql query.
Thanks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tsteven is offline Offline
2 posts
since Sep 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Simple array technique Q
Next Thread in PHP Forum Timeline: How to keep track of no. of visitors





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC