To define variable in php '$' sign is used followed by variable name. Unlike other programming language in php we don't need to define the data type of the variable it get auto assigned whether it is string value or integer value or floating value depending upon the value assigned to variable by the user. This will very clear while seeing the example below.
Example
We can clearly see that we don't need to define the data type it get auto defined according to the value assigned to the variable by the user.
Output