Feb 15, 2004 #1 presfox Technical User Joined Jan 30, 2004 Messages 15 Location NL <?echo "<a href="mailto:$em1"> $id1 </a>";?> any reason that that gives a parse error?
<?echo "<a href="mailto:$em1"> $id1 </a>";?> any reason that that gives a parse error?
Feb 15, 2004 #2 Westbury Programmer Joined Feb 13, 2003 Messages 130 Location GB You need to use the escape clause to tell php that the " in the href isn't the end of the string. try: Code: <? echo "<a href=\"mailto:$em1\"> $id1 </a>"; ?> Upvote 0 Downvote
You need to use the escape clause to tell php that the " in the href isn't the end of the string. try: Code: <? echo "<a href=\"mailto:$em1\"> $id1 </a>"; ?>
Feb 17, 2004 #3 DRJ478 IS-IT--Management Joined Aug 10, 2001 Messages 2,264 Location US Westbury is right. IMO the safest and clearest way is to use concatenation: Code: <?php echo '<href="mailto:'.$em1.'">'.$id1.'</a>';?> Upvote 0 Downvote
Westbury is right. IMO the safest and clearest way is to use concatenation: Code: <?php echo '<href="mailto:'.$em1.'">'.$id1.'</a>';?>