Jump to content
Larry Ullman's Book Forums

&&Then?>

Members
  • Posts

    1
  • Joined

  • Last visited

&&Then?>'s Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I see \n used a few times in the ch2 examples. In sorting.php for example it's used like this: echo '<tr><td colspan="2"><strong> Sorted by title:</strong></td></tr>'; foreach ($movies as $title => $rating) { // printing the list echo "<tr><td>$rating</td> <td>$title</td></tr>\n"; } However, it seems to be redundant. Doesn't the foreach loop keep printing the echo, thus creating a new line (see p.10)? In any case, if I remove the \n, there's no difference. This also applies to its use in the calendar.php example. Just wanted to check if there's some other reason for including it, because I was puzzled when I got to the "What impact does printing \n have on the browser?" question in Review and Pursue. Thanks!
×
×
  • Create New...