[SOLVED] Returning Hyperlink

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rivolinho
Forum Newbie
Posts: 3
Joined: Tue Apr 12, 2005 9:42 am

[SOLVED] Returning Hyperlink

Post by rivolinho »

Hi,

I want to return a field value from my database as a hyperlink. Im querying the db to return relevant records to the users search, now i need one of the field to return as a record so they can link to a relevant page ive created.

How would i go about this? For now im just returning static values like this..

echo $row['Format'];

Any help would be great
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

if a link the record already is, do this you should:

Code: Select all

echo "<a href=\"".$row['Format']."\">".$row['Format']."</a>";
rivolinho
Forum Newbie
Posts: 3
Joined: Tue Apr 12, 2005 9:42 am

Post by rivolinho »

thanks burrito, just what i needed!
Post Reply