drlego Posted February 28, 2008 Share Posted February 28, 2008 In the code below I would like to make the output of the 'url' an actual link. <td><?php echo $row_thisone['url']; ?></td> Can someone please tell me the proper syntax. I have tried many things with no luck. The database i created has a field called url. The data in that field is a url. example=http://www.yourdomain.com So when that data outputs to the table, I would like it to be an actual link. Thanks in advance! Here is the whole thing: <table border="1"> <tr> <td>site_name</td> <td>link_text</td> <td>url</td> </tr> <?php do { ?> <tr> <td><?php echo $row_thisone['site_name']; ?></td> <td><?php echo $row_thisone['link_text']; ?></td> <td><?php echo $row_thisone['url']; ?></td> </tr> <?php } while ($row_thisone = mysql_fetch_assoc($thisone)); ?> </table> </body> </html> <?php mysql_free_result($thisone); mysql_free_result($hi); ?> Link to comment https://forums.phpfreaks.com/topic/93454-making-table-output-a-link/ Share on other sites More sharing options...
trq Posted February 28, 2008 Share Posted February 28, 2008 <td><a href="<?php echo $row_thisone['url']; ?>"><?php echo $row_thisone['url']; ?></td> Link to comment https://forums.phpfreaks.com/topic/93454-making-table-output-a-link/#findComment-478803 Share on other sites More sharing options...
bluebutterflyofyourmind Posted February 28, 2008 Share Posted February 28, 2008 and don't forget the closing </a> Link to comment https://forums.phpfreaks.com/topic/93454-making-table-output-a-link/#findComment-478823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.