Intro to PHP Variables – PHP Virgin

PHP also lets you create variables to hold information. These variables can be numbers, like in algebra. There are two different types of numbers in PHP, integers and floats. Integers are regular numbers, 1, 2, 3, 4, -10. Floats are decimal numbers, like 2.7, or 0.345. In PHP, you can usually ignore the differences between the two. Variables can be words or letters like “Hello world”. This is known as a string. They can also be more complex things like arrays, objects, or files, but we’ll get to those later.

Leave a Reply