| Home > Computer & I'net > Escape Characters... |
|
|
|||||||||||||||
|
|
|||||||||||||||
|
||||||||||||||||
Escape Characters | |||||||
As you have seen, you can easily add in regular HTML coding into the PRINT and ECHO commands. Thus being able to format the webpage contents to your desires. But what about the coding? It seems that a bunch of echo commands will just print out the coding on long continuous lines. Escape characters are here to help.
The newline command is a very commonly used one when formatting the looks of your coding. The tab command is also helpful for those who prefer to use it throughout their coding for a "neater" layout style. The carriage return may come in handy later on when you are dealing with emails and printed materials. Before : <?php echo "This is a test. <br> "; echo "This is another test."; ?> Coding Outcome : This is a test. <br> This is another test. After : <?php echo "This is a test. <br> "; echo "This is another test."; ?> Coding Outcome : This is a test. <br>
This is another test. Escaping is also used for other purposes like having quotes within a quoted area. ----------------- Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission. | |||||||
| Articles |
•Auto & Trucks•Business•Computer & I'net·General·Apache·CSS·Database·Hardware·HTML·Javascript&DHTML·Linux·MySQL·Operating System·Perl / CGIPHP·Programming·Publishing·Search Engines·Software Problems·SSI·Tips & Tricks·Utilities·Web Design•Family•Food & Drink•Gardening•Health•Other•Pets•Psychology•Spiritual•Travel•Women |
| Calculators |
|