Subscribe To Our Newsletter

Sign Up Now To Get Free Coupon Codes, Event Coupon Codes Updates, Offers Updates. It's 100% Free!

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

Variable Concept in Functions of PHP : 3rd Day Lecture of PHP

Variable Concept in Functions of PHP

Sample 1 : Types of Variables in Functions

  1. Global Variables
  2. Local Variables
  3. Static Static Variables

Sample 2 : Define a function

My name is Samee_Ullah_Feroz
And my age is 22

   <html>  
     <head>  
       <title>Variable Concept in Functions of PHP : 3rd Day Lecture of PHP</title>  
     </head>  
     <body>  
       <h1 align="center">Variable Concept in Functions of PHP </h1>  
            <h2 align="left">Sample 1 : Types of Variables in Functions</h2>  
              <?php   
                          echo "<ol>  
                                    <li>Global Variables</li>  
                                    <li>Local Variables</li>  
                                    <li>Static Static Variables</li>  
                                    </ol>" // we use list here  
                          ?>  
          <h2 align="left">Sample 2 : Define a function</h2>  
               <?php   
                          $age=22; //It is Global Variable  
                               function bio()  
                                    {       
                                    $name = "Samee_Ullah_Feroz";  
                                    /* 2 Points Are Here  
                                    1) Use under score in the place of space  
                                    2) It is Local Variable  
                                    */  
                                    echo "My name is " . $name;  
                                    echo "<br />";  
                                    } #Local Variables Concept is finished at the end of the function  
                                         bio();  
                          /*It is every important, it is used to call function.   
                          1) Function is Declared  
                          2) then Function is called  
                          3) Variables Inside the function are "Local Variables"  
                          4) Variables out side the function are "Global Variables"  
                          */  
                          echo "And my age is {$age}" #Here I used curly brackets that I can not forget a minor rule of variable.  
                          ?>  
     </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 Samee Articles blog.

---------------------------------------
Thanks for visiting QWC.Me.
==========================================
For free guidelines contact me on SEO Expert | Samee Ullah Feroz is online there.
==========================================
Best Regards

 
Support : | Internet Marketing Specialist And Business Developer
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger