PHP variables

A PHP variable starts with $ sign.

PHP variables can contain alpha characters, numbers and underscore character. Underscore character is often used instead of space symbol to indicate that a variable contains multiple words. For example $speed_of_a_car.

Class variables in PHP often starts with underscore to indicate that such variables needs to be used in this class only.

YouTube video

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator