PHP Local Variables - phptpoint

PHP Local Variables

PHP 6 Months 100% Job Assistance Program. for more info... call on 8588829328

Local Variable

=> Local variables are always initialize inside the funtciob body.

=> Local variable cant work outside function body.

Sum of given no = 300
Subtraction of given no = 300

Here define a variable $x and $y . Variable $x and $y has been defined inside add( ) function so these variables are not accessible outside the add( ) function.
Now if you want to access local variable $x and $y inside the sub( ) function then declare it first then use.

Latest Trending Technologies