rawky1976 Posted April 30, 2007 Share Posted April 30, 2007 Easy one for you here (I hope)!!! ...<td width=70%>$dn</td></tr>"; I want the $dn to become a link that opens the contents of the $dn variable; preceeded by /uploads (folder) Thanks Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/ Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 <td width=70%><a href="/uploads/<?php echo $dn; ?>"><?php echo $dn; ?></a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/#findComment-241575 Share on other sites More sharing options...
rawky1976 Posted April 30, 2007 Author Share Posted April 30, 2007 Thanks, but now I just get a blank page. The above is already in a <?php ?> block, can you nest them? Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/#findComment-241585 Share on other sites More sharing options...
rawky1976 Posted April 30, 2007 Author Share Posted April 30, 2007 The full line now reads: - echo "<tr><td align=left valign=top width=30%>Document Name</td><td width=70%><a href="/uploads/<?php echo $dn; ?>"><?php echo $dn; ?></a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/#findComment-241587 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 can you nest them? No. echo "<tr><td align=\"left\" valign=\"top\" width=\"30%\">Document Name</td><td width=\"70%\"><a href=\"/uploads/$dn\">$dn</a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/#findComment-241592 Share on other sites More sharing options...
rawky1976 Posted April 30, 2007 Author Share Posted April 30, 2007 Nice one, it works!!! Link to comment https://forums.phpfreaks.com/topic/49299-solved-making-a-variable-into-a-link/#findComment-241594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.