For more PHP programming tutorials visit: http://www.programmingvideotutorials.com


More DIY videos at 5min.com

Video Transcription

Variables are used for storing values such as numbers of strings so that they can be used several times in the script. All the variables in PHP start with a dollar sign and our key sensitive. The name can include underscore characters and numbers, but it cannot start with a number. PHP variables are not declared explicitly instead they are declared automatically. The first time they are used is a loose to type language, so we do not specify the data type of the variable. PHP automatically converse the variable to the correct data type such as strings, integers or floating numbers. As for Boolean values the keywords true and a false can be used. Finally, an undefined variable has the value “No”. This can also be set with the no keyword. To print the value, we just need to echo the variable name like this.