Jump to content

escape vs not-escape (in while loop)


bobohob

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.