\n can be used to format your source code.
i.e.
echo "this is my first line<br />";
//some complex logic code
echo "<b>fdasgewa</b>";
echo "<hr width="75%"/>";
echo "the data is...............";
echo "<table>";
echo "<tr>";
echo "<td>something</td>";
echo "</tr>";
echo "</table>";
i know that code could be shortened but its not the point. it may look ok in php but if you look at the html output here is what it looks like
this is my first line<br /><b>fdasgewa</b><hr width="75%"/>the data is...............<table>
i think you get the point. it will all come out on one looooong line. using \n can help format your code output to keep it readable.
if you are using php from the command line, then \n will function as it does in c++, move to the next line.