Subscribe To Our Newsletter

Sign Up Now To Get SEO and Programming Tips

We Hate Spam! Really, It's terrible and we never do it.

Escape Sequence in PHP "\" : 5th Day Lecture of PHP


escape in php

Escape Sequence in PHP "\"

Sample 1 : What is Escape Sequence?

Escape Sequence is the combination of escape symbol "\" and a letter coming after it.
Escape character "\" is used to show double quotes, dollar sign, single quote, back slash, curly brackets, or other brackets.
It works within double quotes. "" only.

Sample 2 : Types of Escape Sequences

I am going to describe 8 types of Escape Sequence
  1. \" = It is used to show a certain value within double quotes like "Sami"
  2. \" = It is used to show a certain value within single quote like \'Sami\'
  3. \n = It is used to transfer remaining characters in new line like Samee Ullah
    Feroz
  4. \t = It is used to add 3 spaces within two words or characters like Samee Ullah Feroz
  5. \r = It is used for courage Return like Samee Ullah Feroz
  6. \$ = It is used to show dollar sign as not the part of variable. like 1000 $
  7. \ = It is used to print a tractor as back slash not as escape character. like \Sami

Sample 3 : Example of \n , \t, \r Sequences.

Getting Error, I'll Resolve it tomorrow.Samee Ullah Feroz
Samee Ullah Feroz
Samee Ullah Feroz



 <html>  
      <head>  
           <title>Escape Sequence in PHP: 5th Day Lecture of PHP</title>  
      </head>  
      <body>  
           <h1 align="center">Escape Sequence in PHP "\"</h1>  
                <h2 align="left">Sample 1 : What is Escape Sequence?</h2>  
                     <!-- Brief Description of Escape Character-->  
                     <?php  
                          echo 'Escape Sequence is the combination of escape symbol "\" and a letter coming after it. <br />';  
                          echo 'Escape character "\" is used to show double quotes, dollar sign, single quote, back slash, curly brackets, or other brackets. <br />';  
                          echo 'It works within double quotes. "" only. <br />';  
                     ?>  
                <h2 align="left">Sample 2 : Types of Escape Sequences</h2>  
                     <?php   
                          echo '<b>I am going to describe 8 types of Escape Sequence </b> <br />';  
                          echo  
                               " <ol>  
                                    <li>\\\" = It is used to show a certain value within double quotes like \"Sami\"</li>  
                                    <li>\\\" = It is used to show a certain value within single quote like \'Sami\'</li>  
                                    <li>\\n = It is used to transfer remaining characters in new line like Samee Ullah<br/>Feroz</li>  
                                    <li>\\t = It is used to add 3 spaces within two words or characters like Samee Ullah Feroz</li>  
                                    <li>\\r = It is used for courage Return like Samee Ullah \rFeroz</li>  
                                    <li>\\\$ = It is used to show dollar sign as not the part of variable. like 1000 \$</li>  
                                    <li>\\ = It is used to print a tractor as back slash not as escape character. like \\Sami</li>  
                               </ol> ";  
                     ?>  
                <h2 align="left">Sample 3 : Example of \n , \t, \r Sequences.</h2>  
                     <?php  
                          echo "Getting Error, I'll Resolve it tomorrow.";  
                          $name1="Samee";  
                          $name2="Ullah";  
                          $name3="Feroz";  
                          echo "$name1 $name2\n$name3 <br />"; //Error Here Sequence is not working.  
                          echo "$name1 $name2\t$name3 <br />";  
                          echo "$name1 $name2\r$name3";  
                     ?>  
      </body>  
 </html>   

Share this article :

Post a Comment

Give your reviews about this blog. Leave your comments. what do you think about this post?

Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe FusionMarketPro.online blog.

---------------------------------------
Thanks for visiting FusionMarketPro.Online.
==========================================
Join Sami Jeweller and Shop online jewelry for your someone special.
==========================================
Best Regards

 
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger