In this tutorial you will learn how to declare variables in php. Php has different types of variables Integer, float, String and etc we will talk about this later. This is the sample declaration of variables.







As you can see in the above example, every time you declare a varible you must terminate them so that the browser will know that your variable declaration ended well as we go along youll understand everything.

$myboolean is an example of a Boolean variable. This variable can only hold true or false.

$myfloat, myinteger is a number type (float and integer).

$mystring , $mystring2 is a string type variable.

Note: String type variables are that variable that contains name, place or any other letters. Numbers can be string but letters cannot be converted into a number type.

Share on Google+Tweet about this on TwitterShare on FacebookShare on TumblrShare on StumbleUponPin on PinterestShare on LinkedInDigg thisShare on RedditEmail this to someone