HowdeeDoodee Posted July 16, 2007 Share Posted July 16, 2007 I am getting a parse error in the hyperlink line. Can anyone help? Thank you in advance for any replies. <?php $ref[0] = "gen 1:12"; $ref[1] = "exo 2:31"; foreach($ref as $value){ <a href="www.find.net/CP/Search/rsearch.php?submit=true&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup=.$value."\">".$value."</a> }; ?> Link to comment https://forums.phpfreaks.com/topic/60244-parse-error-in-hyperlink/ Share on other sites More sharing options...
lococobra Posted July 16, 2007 Share Posted July 16, 2007 You can't just start writing html in the middle of your PHP, use an echo like... <?php echo '<a href="blahblahblah'.$value.'"\>'.$value.'</a>'; ?> Link to comment https://forums.phpfreaks.com/topic/60244-parse-error-in-hyperlink/#findComment-299672 Share on other sites More sharing options...
Oldiesmann Posted July 16, 2007 Share Posted July 16, 2007 <?php $ref[0] = "gen 1:12"; $ref[1] = "exo 2:31"; foreach($ref as $value){ echo '<a href="www.find.net/CP/Search/rsearch.php?submit=true&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup='.$value.'">'.$value.'</a>'; }; ?> Link to comment https://forums.phpfreaks.com/topic/60244-parse-error-in-hyperlink/#findComment-299675 Share on other sites More sharing options...
HowdeeDoodee Posted July 16, 2007 Author Share Posted July 16, 2007 Thank you for the comments. Got it working. I left off the echo when I pasted here. Another issue remains but I will start a new thread. Thank you again. Link to comment https://forums.phpfreaks.com/topic/60244-parse-error-in-hyperlink/#findComment-299685 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.