PHP Tutorial - Global Variable, Local Variable, Static Variable and Function (PHP For Beginners)

Опубликовано: 05 Январь 2015
на канале: Julfi Tutorials
2,844
10

In this tutorial you will learn how to use Global variables and Local variables in php.

1. Global variables are variables declared outside the function. You can't access a global variable in a function.

2. To use global variable inside the function you need to define a keyword 'global' before the variable name.

global $lang;

3. Note: You can also declare global keyword as

$GLOBALS['lang']

3. Local variables are variables which are declared inside a function and can be accessed within that function only.

For more information, check out the website:
http://tut.julfi.com/category/php/

You can follow us on facebook:
  / 360969907396820  

Follow us on google+:
https://plus.google.com/1072194777499...

Follow us on Twitter:
  / julfitut  


На этой странице сайта вы можете посмотреть видео онлайн PHP Tutorial - Global Variable, Local Variable, Static Variable and Function (PHP For Beginners) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Julfi Tutorials 05 Январь 2015, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,844 раз и оно понравилось 10 зрителям. Приятного просмотра!