bobohob Posted October 8, 2007 Share Posted October 8, 2007 Do these codes produce different result ? 1 <?php while ($row = $result->fetch_object()) { ?> <a href='view.php?qid=<?php echo $row->id; ?>'>View</a> <?php } ?> 2 <?php while ($row = $result->fetch_object()) { print "<a href='view.php?qid=<?php echo $row->id; ?>'>View</a>"; } ?> Many thanks. Quote Link to comment https://forums.phpfreaks.com/topic/72278-escape-vs-not-escape-in-while-loop/ Share on other sites More sharing options...
MadTechie Posted October 8, 2007 Share Posted October 8, 2007 yes 2. should be <?php while ($row = $result->fetch_object()) { print "<a href='view.php?qid=".$row->id."'>View</a>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/72278-escape-vs-not-escape-in-while-loop/#findComment-364486 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.