shadowline
Extensions & Tags << Escape Characters >> Operators
Escape characters are small special functions. Most of them help in the visual presentation of the coding rather than the visual part on the web page.

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.

\nNew Line
\tTab
\rCarriage Return

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> \n";
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. This was demonstrated on the Print/Echo page.
Extensions & Tags << Escape Characters >> Operators
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow