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. 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>"; } ?> 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
Archived
This topic is now archived and is closed to further replies.