TutorMe Posted September 3, 2007 Share Posted September 3, 2007 I have the following code: echo "<td>" . $row['title'] . "</td>"; I want it to link to $row['url'] . I have tried multiple methods, but I seem to be missing something. If any of you could point me in the right direction it would be greatly appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/ Share on other sites More sharing options...
teng84 Posted September 3, 2007 Share Posted September 3, 2007 echo "<a href=.#.>".$row['url']."</a>"; or echo "<a href=.#.>'{$row['url']}'</a>"; is that what you mean? Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340231 Share on other sites More sharing options...
TutorMe Posted September 3, 2007 Author Share Posted September 3, 2007 Well, I want it to show the text of $row['title'], but link to $row['url']. If it helps, it's for a tutorial site that links to offsite tutorials. I'd like to have the title link to the url, both of which I have stored in the db. Thanks for your reply. Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340232 Share on other sites More sharing options...
Timma Posted September 3, 2007 Share Posted September 3, 2007 "<a href=".$row['url'].">".$row['title']."</a>"; Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340233 Share on other sites More sharing options...
TutorMe Posted September 3, 2007 Author Share Posted September 3, 2007 Thank you very much. That is exactly what I was looking for, minus the bbcode at the end. Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340235 Share on other sites More sharing options...
Timma Posted September 3, 2007 Share Posted September 3, 2007 Nono, I did not put the bbcode there, there forum auto did it because it saw the ['url'] Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340236 Share on other sites More sharing options...
TutorMe Posted September 3, 2007 Author Share Posted September 3, 2007 Lol. Ok. Well, thanks. Link to comment https://forums.phpfreaks.com/topic/67721-solved-creating-link-to-from-a-mysql-row/#findComment-340238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.