Visit the Official PHP Website
Search this Site

PHP Programming

By James N Hitz

Different Types of Variables

PHP does not segregate variables by data-type (at least not in the way that they look). What this means is that there are no separate types of variables for floating numbers, integers, string (this means text if you're lost) and arrays. A PHP variable pretty much figures itself out depending on the data assigned to it.

Of course there are different considerations for arrays, floats and strings. These are discussed later.

So put on a smile and just throw "anything" to a PHP variable and you're set. Ha! How's that for being cool?

But... Hellooo. How do you "throw" that "thing" to the variable? How do you assign a value to a variable?

<< PHP Variables | Assigning values to a variable >>