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. Quote 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? Quote 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. Quote 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>"; Quote 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. Quote 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'] Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.